• Resolved Francesco

    (@francifoto98)


    Hi, i have several problems on my website using PDF.js plugin, it went all good but suddenly after a very recent update of the plugin i have troubles :

    This is the error messagge:
    PDF.js v2.6.347 (build: 3be9c65f)
    Messaggio: file origin does not match viewer’s

    I immediately tought about a CORS error but is not in my case, i checked the origins of file and has the same origin of my website.

    I don’t know how to solve this, and more over is causing a lot of troubles for my customers.

    Waiting for your reply i wish you best regards.

    • This topic was modified 3 years, 4 months ago by Francesco.
    • This topic was modified 3 years, 4 months ago by Francesco.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Thomas McMahon

    (@twistermc)

    What editor are you using Gutenberg or Classic?

    If classic, can you copy and paste the shortcake in here?

    Do you have a URL where I can see the issue happening?

    Thread Starter Francesco

    (@francifoto98)

    Hi Thomas,
    Actually i am using a classic editor, do i have to put the shortcode generated for pdfs?

    Sure, i have a screenshot of the issue:
    https://ibb.co/gZmFFPQ

    Plugin Author Thomas McMahon

    (@twistermc)

    Are you using the classic editor? If so, what’s the shortcode look like in the editor?

    A few people have been reporting this issue, but my plugin is not encoding the URL and I’m not sure what is.

    Thread Starter Francesco

    (@francifoto98)

    I have a sample shortcode for pdf: here is the code: [pdfjs-viewer url="https%3A%2F%2Fpiuitalialearning.it%2Fwp-content%2Fuploads%2F2021%2F04%2FCORSO-CUOCO-DI-CUCINA-ITALIANA.pdf" viewer_width=100% viewer_height=800px fullscreen=true download=false print=false]

    Plugin Author Thomas McMahon

    (@twistermc)

    Yea, the issue is that the URL is encoded. Not sure how that’s happening but the URL shroud be https://piuitalialearning.it/wp-content/uploads/2021/04/CORSO-CUOCO-DI-CUCINA-ITALIANA.pdf

    Do you have any other PDF plugins installed or TinyMCE plugins?

    Thread Starter Francesco

    (@francifoto98)

    Now i get it so the problem is url encoding. No i haven’t installed any of the plugin mentioned. So now i have to change manually for each pdf document right?
    Thank you so much for your support.

    Plugin Author Thomas McMahon

    (@twistermc)

    Yes, it needs to be changed for each document, however it should only effect new documents right? Or are you old posts also having issues?

    I’ll work on decoding the URL in the plugin since it seems like people are having this issue, but not sure how urgent a fix is needed.

    Thread Starter Francesco

    (@francifoto98)

    Hi Thomas,
    Sorry for replying late but i found an editor that you mentioned, it was installed by the web designers on my site this maybe this one causing the conflict?

    The editor is TinyMCE

    Plugin Author Thomas McMahon

    (@twistermc)

    It could be, it’s hard to tell because any plugins could be causing a conflict. I’m working on a fix to decode the URL to work around this.

    Thread Starter Francesco

    (@francifoto98)

    Thank you so much again, i will tell you also if TinyMCE is the responsible for all this troubles.

    Plugin Author Thomas McMahon

    (@twistermc)

    I released a new version of the plugin, give it a shot.

    Thread Starter Francesco

    (@francifoto98)

    Hi Thomas, sorry for my late replying, i decoded all the urls i had manually it was a very long work, cause unfortunately some url remained encoded for some uknown reasons. The new version it seems working perfectly, and more over the new version of the plugin saved me a lot of time for all other pdfs. Thank you for your magnificent work!

    Plugin Author Thomas McMahon

    (@twistermc)

    That’s great to hear!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Problems on loading pdf after latest update’ is closed to new replies.