gdelugre / origami

Origami is a pure Ruby library to parse, modify and generate PDF documents.
GNU Lesser General Public License v3.0
325 stars 110 forks source link

Error signing file #56

Closed ekzobrain closed 1 year ago

ekzobrain commented 5 years ago

test.pdf

Hi.

Attached file is incorrectly signed by Origami. This file was created in Microsoft Word and saved as PDF. The problem is that ByteRange[3] value differs from eventual filesize. Changing "file_data = output()" to "file_data = output(rebuild_xrefs: false)" seems to fix the issue for Origami validator, but Adobe Reader reports "Unexpected byterange" error.