Closed melissa-edge-il closed 5 years ago
Thanks. You are right, they mention it in the specification. We will fix it.
Thanks so much for fixing this @pofider! When can we expect to see it pushed out to jsreport?
You can install github dependency from master and have it working right now
npm i jsreport/jsreport-pdf-utils
We don't have a strict schedule for releasing jsreport. It is always every few months. I guess it will happen somewhen in August.
Quick question: will these changes still be pulled in on a new version of jsreport without a new release on pdf-utils? Not sure how Github releases work.
@melissa-edge-il first we will release new version of jsreport-pdf-utils and then that new version will be included in the next release of jsreport (2.6.0).
I'm seeing a couple issues with pdfs generated using pdf-utils.
I found these with jsreport version 2.0, but could reproduce on the current jsreport playground (version 2.5.)
Here's what I'm seeing:
I believe these issues stem from the /Info section of the document trailer. Adobe's specification requires that the Info dictionary be an indirect reference. (here, page 88/978 of the document itself.) It seems that every pdf I generate with pdf-utils uses an actual dictionary in the trailer instead of a reference. I've tried using simple to complex templates with many combinations of operations and options, and have seen this same thing each time. When I use jsreport to generate pdfs without pdf-utils, the info dictionary is indirectly referenced, and I don't see either of the issues mentioned.
When I manipulate the pdfs by hand, creating a separately-referenced Info dictionary object, both issues disappear. I can save just fine in adobe products, and the document title shows up properly in a browser tab title.