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
I'm new to javascript and have been tasked with creating a table of contents in an existing PDF. I was wondering if there was a way in PDFDocument or PDFPage where I can search for text a string.
I read the existing pdf in using fs.fileread. But if a do a .toString() on the PDFPage I cannot see any text. My thinking was I could read the PDF in, go page by page and search for headers and make a note of what page they are found in. Then insert a blank page and use drawText to display the header along with a page number.
Thanks for any help you can give me.
The text was updated successfully, but these errors were encountered:
I'm new to javascript and have been tasked with creating a table of contents in an existing PDF. I was wondering if there was a way in PDFDocument or PDFPage where I can search for text a string.
I read the existing pdf in using fs.fileread. But if a do a .toString() on the PDFPage I cannot see any text. My thinking was I could read the PDF in, go page by page and search for headers and make a note of what page they are found in. Then insert a blank page and use drawText to display the header along with a page number.
Thanks for any help you can give me.
The text was updated successfully, but these errors were encountered: