documentCapture.documentToText() returns an empty ...
# ask-stanley-ai
a
documentCapture.documentToText() returns an empty string when used on some PDFs, but not others. The PDFs it returns empty strings on also do not let me select text by click-dragging it when viewing the PDF in my web browser. What do I need to do for NetSuite to be able to extract text from these PDFs, and what is making them different from the PDFs that it can extract text from?
c
AI generated answer (using internal Slack threads):
The
documentCapture.documentToText()
function in NetSuite is used to extract text from PDFs. However, it may return an empty string for some PDFs because these PDFs might be image-based or scanned documents. These types of PDFs do not contain selectable text, but rather, they contain images of text. This is why you are unable to select text by click-dragging when viewing these PDFs in your web browser. NetSuite's
documentCapture.documentToText()
function can only extract text from text-based PDFs, not from image-based or scanned PDFs. This is the difference between the PDFs that NetSuite can extract text from and those it cannot. To extract text from image-based or scanned PDFs, you would need to use Optical Character Recognition (OCR) technology. OCR is a technology used to convert different types of documents, such as scanned paper documents, PDF files or images captured by a digital camera into editable and searchable data. However, NetSuite does not have built-in OCR capabilities. You would need to use a third-party OCR service, such as Google Tesseract, Amazon Textract, or Microsoft OCR. You would need to send the PDF to the OCR service, the service would process the PDF and return the extracted text, and then you would store or use the extracted text in NetSuite. Please note that moving customer documents out of their NetSuite account to an external platform for OCR processing could have privacy implications, and you should ensure that you comply with all relevant privacy laws and regulations. ****** 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.81842047
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815734863
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814331114
Please provide your feedback on this answer.