Contents.push is not a function #1210
Unanswered
mrfolkblues
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a script that writes a timestamp string to the top of each page of a PDF that comes in as a base64 encoded string from a file upload UI. It looks basically like this:
Most documents are processed successfully. I have had one failure so far though. The error message & stack were:
This will, unfortunately, be difficult or impossible to reproduce without the document in question, which I cannot share for privacy reasons. However, I can share a little information.
The
drawText()
method failed on the final page of the document. I loggedpage.node.normalizedEntries().Contents
using a safeStringify function I found to handle circular references. The output ofpage.node.normalizedEntries().Contents
for the next to last page looked like this:While the output of the last page looked like this:
I'm hoping this means something to someone. I'd make a proper issue if I felt like this could be reproduced reliably. Please reply if you have any insight into this problem.
Beta Was this translation helpful? Give feedback.
All reactions