pipwerks / PDFObject

A lightweight JavaScript utility for dynamically embedding PDFs in HTML documents.
http://pdfobject.com/
Other
2.39k stars 986 forks source link

Embed Base64 30 MB or more dont show #307

Closed CesarMar05 closed 2 weeks ago

CesarMar05 commented 2 weeks ago

I tried to embed a base64 pdf of 40 MB or more and the file dont show on the div, with files less than 30 MB its shows.

PDF of 28 MB

image

PDF of 40 MB

image

This is my script, for security ressons I can´t share the txt files that contains the base64 string

LeeArchivo.txt

Thanks in advance for the support.

pipwerks commented 2 weeks ago

Hi @CesarMar05

Unfortunately, you're at the mercy of browsers to support large base64 PDFs, there's nothing PDFObject can do to change how browsers handle these files. PDFObject simply writes HTML to the page, the browser handles the PDF rendering.

If you really need to be able to display a large base64 PDF, you could try bypassing the native PDF rendering via PDFJS.

Good luck