Hi, Is it possible to display PDFs in the full screen view? Perhaps there's some JS plugin I can use which can render PDFs?
Thanks
Hey @lougreenwood,
lightGallery is designed specifically for images and videos. It doesn't support PDF. But, It is not hard to implement. I'll try to include in version 2.0
@sachinchoolur I understand that you only intend for it to display images and video, but technically both are just kinds of visual media. Just as a PDF is.
Can we keep this issue open as a feature request for 2.0? Thanks
Done
Hi, I really like LightGallery, and it's just extraordinary.
Would you like to view PDF files, any idea when this will be implemented?
I do this with the current version already, not an issue at all.
$(this).lightGallery({
thumbnail: false,
zoom: false,
fullScreen: false,
download: false,
hideBarsDelay: 1000,
dynamic: true,
dynamicEl: [{
"iframe": "true",
"src": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
}]
});
@jrobinsonadrenaline Getting warning on console after using the above code.
Resource interpreted as Document but transferred with MIME type application/pdf.
PDF seems working after updating SRC to:
{
"iframe": "true",
"src": "https://docs.google.com/gview?url=https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&embedded=true"
}
@sachinchoolur Do we get the newer version anytime soon?
the dynamicEL: [{'iframe': !0, "src": "https://linkto.pdf"}] does work but looses the interactive functionality of zoom, swipe and pinch. Is there another way to format the JS to return this functionality?
This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.
Most helpful comment
I do this with the current version already, not an issue at all.