Copy link to clipboard
Copied
I need help to create a code, I try to create a code for "Find and Replace All word in a PDF file". is it possible? and can you give me an example of the code?
It's not possible using JavaScript. Acrobat JavaScript does not have access to the content on a page. You'd need to create a plugin using C++ and it won't be a trivial task.
Copy link to clipboard
Copied
It's not possible using JavaScript. Acrobat JavaScript does not have access to the content on a page. You'd need to create a plugin using C++ and it won't be a trivial task.
Copy link to clipboard
Copied
Thank you.
What do you mean with it won't be a trivial task? Do I have to be worried?
Copy link to clipboard
Copied
This will require you to write, compile, and install a program using a computer language like C++. This is a more complex task than just writing a simple "Hello World" program, You will need to down load the Acrobat SDK and include the special code snippets that are explained in the documentation. You will then need to install the debugged program. If you write this for a generalized search and replace you most likely will need to include some pattern matching either similar to RegEx or a RegEx subroutine. There are a number of books written about RegEx.
Copy link to clipboard
Copied
Acrobat is not an authoring or word processing program. It has very little editing ability. With Acrobat Professional you can have access to a Redaction tool that can find words and replace the word with another word, but you are limited in space and size since Acrobat does not reflow text like MS Word. You would be far better off using the original program that was used to create the PDF document and then creating a new PDF from the revised document. This is a much better approach because when you go back to perform a major revision of the original document you have the source that was used to create the PDF and you will not repeat the error you are trying to correct now.
Copy link to clipboard
Copied
You don't need to create any code nor to reinvent the wheel.
Open your PDF with (the free) LibreOffice : Edit menu : Find & Replace : Replace All.
Adobe engineers still have a lot of room for improvement.
Copy link to clipboard
Copied
Thank you, I have already tried this way, I think it is the best method to resolve my problem
Find more inspiration, events, and resources on the new Adobe Community
Explore Now