Forum Academy Marketplace Showcase Pricing Features

PDF Viewer plugin

Hey Bubblers,

I have been using the PDF viewer plugin and made it work not long ago but I keep getting an error message now and I can’t figure out how to fix this.

Here’s the message:

PDF.js v2.0.943 (build: dc98bf76)
Message: Unexpected server response (403) while retrieving PDF “https://s3.amazonaws.com/appforest_uf/xxxhfuezid123343432/null”.

Anything I am obviously doing wrong?

Hi @pierre.tillement!
My experience is that the best option is to use the official pdf viewer from adobe (it’s free and fully reliable). Adobe Developers - PDF Embed API | Embed PDF in HTML | Adobe Document Services. :slight_smile: Hope it helps!

6 Likes

@Diego this worked like magic, thanks for sharing!

1 Like

@Diego how did you implement yours? I have it setup where based on a button click a popup will appear and open the adobe Lightbox option, but when I click close on the adobe embed, I can’t reopen it when I click the original button to open the popup.

Edit: meaning the PDF will render just once and will never render again if I close the adobe embed

Edit2: Nvm full page in a popup works as it should, I abandoned the Lightbox option

@jcalvarezjr , indeed the lightbox option is quite tricky. The best option, as you mention is to use the full page option. And use a button to close the pop-up instead of the button of the pdf container. If you want to make it full screen (something similar to the lightbox option), just add another piece of html inside the pop-up:

div#fullwidthpopup , div#pdfpopup { width: 100% !important; height: 100% !important; position: fixed !important; top: 0 !important; left: 0 !important; margin-left: 0 !important; } div.fullwidthpopup .bubble-r-box , div.fullwidthpopup .RepeatingGroup, div.fullwidthpopup .HTML { width: 100% !important; height: 100% !important; }

and set the ID attribute of the pop-up and the pdf html to “pdfpopup” (as you can see in the code above)

Hope it helps!

1 Like

Hi Diego, We are trying to make the PDF API work but cannot figure this out, we been researching and trying over and over and nothings works. Could you please point us in the right direction since you’ve successfully implemented it. Much appreciate any help you can provide. Many thanks!

Hi @pierre.tillement

When i look your bug is not related to plugin. Im the actual plugin develop of this pdf viewer plugin.
May i know the exact issue or share your app editor link? Will check and fix your issue.

Hey @testingwebdev2016

I had figured out the issue and need to update the plugin’s version. It works like a charm now. Thanks a lot

Great to hear :slight_smile: Anything need on this plugin please let us know

Hi @testingwebdev2016 , I am running into an error when I have different PDFs where some are landscape and others are portrait oriented. When I go from viewing a landscape oriented pdf to a portrait one (or vice versa) the viewer gets stuck and takes infinite time to load and I have to refresh my page to view the other document. Any ideas on how to fix that?