yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
667 stars 104 forks source link

Exporting large areas throws invalid size error Acrobat Reader DC #52

Closed fskpf closed 6 years ago

fskpf commented 6 years ago

Exporting large areas to PDF yields an invalid size error in Acrobat Reader DC.

Please try the attached reproduction. It will create a blank 15000x15000 PDF that is opened correctly in Chrome, but throws an error in Acrobat Reader. If the file would have content, it would be clipped. Note that I've also attached the ouput.pdf that is generated from the test case:

big-area-test.zip output.pdf

Is this a general PDF limitation or is there something wrong in svg2pdf or jsPDF? Maybe it can be fixed.

HackbrettXXX commented 6 years ago

The PDF specification suggests these limits for page sizes.

The minimum page size should be 3 by 3 units in default user space; the maximum should be 14,400 by 14,400 units.

Readers may or may not follow them. So this is an "issue" of the Acrobat Reader.