Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'/Fields' is a PDFRef so it cannot be pushed to #218

Open
bistrachilikova opened this issue Dec 29, 2023 · 1 comment
Open

'/Fields' is a PDFRef so it cannot be pushed to #218

bistrachilikova opened this issue Dec 29, 2023 · 1 comment

Comments

@bistrachilikova
Copy link

Describe the bug and the expected behaviour
We are attempting to sign a PDF file and we are adding a placeholder with placeholder-pdf-lib. However, we are getting the 'fields.push is not a function' error from pdfLibAddPlaceholder.js:124
fields.push(widgetDictRef);
I noticed that when reading the PDF, the '/Fields' object is a PDFRef, not a PDFArray - not sure if this is expected.

Is it a bug in signing or in the helpers?
Not sure

To Reproduce
I'm unfortunately unable to give you the PDF that's giving us issues. Here is what the /Fields object looks like:
PDFName { encodedName: '/Fields' } => PDFRef { objectNumber: 32, generationNumber: 0, tag: '32 0 R' },

@vbuch
Copy link
Owner

vbuch commented Jan 29, 2024

Just in theory (without looking at code), the PDFRef should be pointing towards an array object where it should be possible to push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants