Programmatically replace text in PDF
Asked Answered
O

1

4

I have PDF files with text that should be replaced. More specificly, the text should be translated and replaced with the translated version. It's important that the rest of the PDF structure stays intact. Note that the text is available in the PDFs and techniques like OCr are not needed. Also, it would be nice if font and other text attributes are kept.

Which libraries would you recommend for extracting the text to an easy to edit format (such as CSV) and put the new text back in again?

Openmouthed answered 5/7, 2011 at 23:50 Comment(0)
P
1

Assuming you are replacing text with a different language, you will have to choose a different font in most cases, and the font choice is non-trivial. I've used the Foxit libraries to change text or create PDFs with success.

Pentyl answered 5/7, 2011 at 23:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.