LEADTOOLS Support
Document
Document SDK Questions
Re: Search and Replace text programmatically in pdf file
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, November 23, 2009 12:25:41 AM(UTC)
Groups: Registered
Posts: 3
Hi, I need to search and replace text programmatically in existing pdf file.
Does anyone know how to do it (well done working example - I have licenses for Imaging Pro and Pdf Reader/Writer addon)?
Thanks in advance!
A.
#2
Posted
:
Monday, November 23, 2009 3:34:09 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
To change a text in a PDF file, you will need to do the following:
1. Load the PDF file in a high loading resolution (because of step 2). This will "rasterize" it. Which means that each PDF page and its entire contents (Text objects, Picture objects, etc.) will become one image.
2. Perform Optical Character Recognition (OCR) on the loaded PDF to extract the text from the "rasterized" file.
3. Obtain and edit the result of the OCR to replace the desired Text.
4. Save the modified OCR result as searchable PDF.
Please note that for the steps above you will need:
1. Document Imaging SDK or above.
2. One of our OCR module.
3. The PDF OCR SDK to save searchable PDFs.
For more information please check the following links:
http://leadtools.com/SDK...t/Document-Addon-OCR.htmhttp://leadtools.com/SDK...ocument-Addon-OCRPDF.htm________________________________________
Edit by moderator: In newer versions of LEADTOOLS, you don't need to perform OCR to find text in PDF files. The PDFDocument.ParsePages() method returns all the text when used with the PDFParsePagesOptions.Objects option. This is demonstrated in the DotNet PDFDocumentDemo project shipped with the toolkit.
Edited by moderator Thursday, February 1, 2018 4:32:48 PM(UTC)
| Reason: Not specified
LEADTOOLS Support
Document
Document SDK Questions
Re: Search and Replace text programmatically in pdf file
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.