pdfmake icon indicating copy to clipboard operation
pdfmake copied to clipboard

PDFs are very large in Firefox

Open EpicWolverine opened this issue 10 years ago • 3 comments

I have an application that exports PDFs. I've noticed that when these are generated in Firefox, they are much larger in file size than they are when exported in Chrome or IE. This is so bad that it can slow down the browser when opened with the built in PDF.js (see the size of test1). pdf_testing_2016-08-09_16-11-41 Turning on compression (#609 and #622) actually made the file sizes worse so I left that off. I've poked around with comparing the resulting base64 data and it looks like a lot of junk data is being written for some reason. There are lots of long sections of repeated "AA" which converts to �. Another section I decoded was full of � characters with data mixed in between. While you can't just grab sections of base64 and expect a PDF out of it, a similar section of base64 from Chrome decodes to actual numbers and other data.

I'm not sure how to go about tackling this issue or what other details you may need to help me with this. Let me know if you need to know more. I do have another (possibly related) issue (#665) in the same application so that may be worth looking at.

EpicWolverine avatar Aug 09 '16 21:08 EpicWolverine

It seems this problem is limited to Firefox 48, as Firefox 47 works as expected. pdf_testing_2016-08-10_11-41-26

EpicWolverine avatar Aug 10 '16 15:08 EpicWolverine

Can you try it with new version pdfmake (0.1.22) and with lastest Firefox?

liborm85 avatar Dec 23 '16 16:12 liborm85

Sorry for not responding. Long story short, the job this was for is seasonal and I was unable to test this until now. However, I can confirm that it does work as expected with the latest version of pdfmake (0.1.29) and Firefox (53.0.3).

Thank you for looking at my issue and working on this awesome project.

EpicWolverine avatar May 31 '17 14:05 EpicWolverine