70
Views
4
Comments
[pdfJS Viewer Reactive] PDF JS Viewer: Invalid PDF Structure
pdfjs-viewer-reactive
Reactive icon
Forge asset by Eduardo Jauch

Hi all,

I am using the PDF JS Viewer to view some PDF's that contain only text. I receive the message below:

(Invalid or damaged PDF -file)


If I download the PDF I can open it with any PDF viewer.

If I take a look at the inspector, I notice the following:

and:

(Will-change mamory usage is too high)


Anyone to help me?


2023-03-30 10-13-40
Miguel Antunes

Hi René,

Is it possible for you to share the PDF file with us? Or in private message with me? So I can take a look at it.

2022-10-13 09-45-15
René Antenbrink

Here you are. It is a test document, so no problem to share it. In the adobi embed API the document shows fine.


René

1650028254-ZZPovereenkomst opmerkingen rene.pdf
2023-03-30 10-13-40
Miguel Antunes

Hi René,

You're probably doing something wrong. I added the file to the Demo module, and I can preview it there:

You need to pass as input parameter the URL of the file, and this URL needs to be accessible from the internet.

2022-10-13 09-45-15
René Antenbrink

Hi Miguel,


I'm afraid there is a mistake, that is fully caused by myself. Actually I am using a PDF that is stored in the database as binary. This, because the (web)application that created the document initialy can't be publicly approached, for security reasons. Therefore I download the document in the database and use the "PDF Viewer From Binary Data" from Forge.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.