phihag / pdfform.js

Fill out PDF forms in pure JavaScript
Apache License 2.0
208 stars 73 forks source link

Invalid xref stream index #20

Open smirciat opened 5 years ago

smirciat commented 5 years ago

I am able to use many pdfs, but I have one that is giving me the error:

Invalid xref stream index: index says 1 objects, but space for 42

As the error suggests, there are 42 fields on the pdf form that should be fillable, but only the first one appears. That first field is a "Clear All" action that appears as a checkbox in the demo fields area. I can attach a link to the pdf in question if that helps. Thanks!

smirciat commented 5 years ago

Changing the field names in the pdf file started to make them show up in the demo, then I realized that the field names were repeated throughout the pdf on separate pages. The original intent was to type the name in a field on the first page and it would also appear under the same field name in subsequent pages. This seems to through this library off, it wants only unique field names.

phihag commented 5 years ago

The problem with xrefs is fixed in master already; I will prepare a release. In any case, I definitely need a copy of a the PDF file to reproduce the issues, so please do link to it.

smirciat commented 5 years ago

The problem with xrefs is fixed in master already; I will prepare a release. In any case, I definitely need a copy of a the PDF file to reproduce the issues, so please do link to it.

I am excited about this repository and that you are still actively developing it! https://s3-us-west-2.amazonaws.com/bering-reservations/Original+OSM.pdf should get you the pdf I've been working on. Thanks!

Eckhart-csjc commented 5 years ago

Verified that this issue is fixed for me in 1.0.14. I'll echo @smirciat 's sentiment -- thanks for making this package and keeping it up to date!

creativeJoe007 commented 3 years ago

I am experiencing this issue with the W9 form.