I tried to use documentCapture.documentToStructure...
# ask-stanley-ai
a
I tried to use documentCapture.documentToStructure on a PDF that is 17 pages long. But instead of a DOCUMENT_TOO_LONG error, it gave me an Unexpected Error wrapped in a DOCTOSTRUCTURE_ERROR. Does this mean something else went wrong besides the document length? This is not a PDF rendered by suitescript. It is not creating the PDF. It is reading a PDF that has no embedded text (is only images of text) and extracting the text from it via OCR. This has nothing to do with the render module or PDF templates, only with documentCapture.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that the
documentCapture.documentToStructure
error you're encountering might not be related to the document length. The error message you're seeing,
DOCTOSTRUCTURE_ERROR
, is a general error message that can be thrown for a variety of reasons, not just when the document is too long. In the threads, users have reported similar unexpected errors when working with PDFs in NetSuite, and these issues were often related to the PDF templates themselves. For example, one user mentioned that their issue was resolved when they fixed an issue with their template. Another user suggested that special characters on the form that the PDF template is pulling from could cause issues. Given this, it's possible that the error you're seeing is related to the content of the PDF itself, rather than its length. You might want to check the content of your PDF for any potential issues that could be causing this error. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.798400879
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.796386719
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.794494629
Please provide your feedback on this answer.