Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

"Find and Replace All word in a PDF file".

Community Beginner ,
Jun 09, 2018 Jun 09, 2018

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?

TOPICS
Acrobat SDK and JavaScript , Windows
5.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 09, 2018 Jun 09, 2018

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.

Translate
Community Expert ,
Jun 09, 2018 Jun 09, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 10, 2018 Jun 10, 2018

Thank you.
What do you mean with it won't be a trivial task? Do I have to be worried?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 10, 2018 Jun 10, 2018
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 09, 2018 Jun 09, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 10, 2018 Jun 10, 2018

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.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 10, 2018 Jun 10, 2018

Thank you, I have already tried this way, I think it is the best method to resolve my problem

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines