You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when using flatten, Could not find page for PDFRef #967
I'm currently trying to figure out what is going on.
I fill a form from my PDF and then I need to use flatten in order to "save" the values and then download said PDF.
At the moment of using flatten there is an Unhandled Rejection, as follows
Unhandled Rejection (Error): Could not find page for PDFRef 439 0 R
which I understand means that once the field is flatten, the library will delete the field and uses the ref value of the field in order to do this, in this case, it looks for a field with a ref value of "439 0 R" but it does not exist, so I looked around to see what was said problem, using the following code
Hello @neoygdrassyl! I'll need more information to be of any assistance on this. Please fill out the new bug report form and we can continue from there.
I encounter a similar issue recently. We created a PDF from a Word document and then added fields using Wondershare's PDF Element software. When I try to flatten the form (which is multipage) I get:
Uncaught (in promise) Error: Could not find page for PDFRef 1188 0 R
findWidgetPage PDFForm.js:592
flatten PDFForm.js:456
Flatten regform:181
async* regform:186
jQuery 8
<anonymous> regform:156
[PDFForm.js:592:22](https://unpkg.com/pdf-lib@1.16.0/es/api/form/PDFForm.js)
I haven't had trouble with the same code for other pages that we created, although those are all single page forms.
Activity
Hopding commentedon Sep 22, 2021
Hello @neoygdrassyl! I'll need more information to be of any assistance on this. Please fill out the new bug report form and we can continue from there.
sscotti commentedon Jun 25, 2022
I encounter a similar issue recently. We created a PDF from a Word document and then added fields using Wondershare's PDF Element software. When I try to flatten the form (which is multipage) I get:
I haven't had trouble with the same code for other pages that we created, although those are all single page forms.
makarov-roman commentedon Jul 20, 2022
#1281
Some broken fields may include annotations in their Kids array