editing a pdf file using javascript: how to do?

New Here ,
Nov 06, 2017

Copy link to clipboard

Copied

just realized that it is possible to edit PDF files using javascript.

I have some, very small, experience in the past writing controls in javascript but honestly I don't know how to edit a pdf file using this language.

I especially don't know where to begin...

May someone help me?

examples and steps to begin are really appreciated 🙂

thanks!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

8.9K

Likes

Translate

Translate

Report

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

editing a pdf file using javascript: how to do?

New Here ,
Nov 06, 2017

Copy link to clipboard

Copied

just realized that it is possible to edit PDF files using javascript.

I have some, very small, experience in the past writing controls in javascript but honestly I don't know how to edit a pdf file using this language.

I especially don't know where to begin...

May someone help me?

examples and steps to begin are really appreciated 🙂

thanks!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

8.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 06, 2017 0
Adobe Community Professional ,
Nov 06, 2017

Copy link to clipboard

Copied

Where to start depends on what you mean by editing. If you are thinking you can edit existing page content, you're going to be disappointed.

You might want to start by reading what modifications are possible at the link below.

Acrobat DC SDK Documentation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2017 0
New Here ,
Nov 06, 2017

Copy link to clipboard

Copied

thank you joel for your reply

honestly I hope to be able to modify the content, anyway I also need to add pages (one before, one after my original pdf) and also to save my original pdf as a photo (and probably also other features...)

so, your link is very interesting but how can a beginner like me write something to do that?

indeed i don't know how to start...i would need the steps to follow...

😕

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2017 0
Adobe Community Professional ,
Nov 06, 2017

Copy link to clipboard

Copied

You can insert pages and export the PDF as images using scripts.

If you do not know JavaScript at all, take an online class but understand that the techniques used to manipulate HTML are not the same as PDF. Most online courses don't differentiate between the JavaScript Core and the browser extensions. You'll need to basically figure that part out on your own.

Once you understand the basics of the JavaScript Core go to

http://www.pdfscripting.com for some great tutorials

and

Learning to Program JavaScript for Adobe Acrobat - KHKonsulting LLC

Good luck.

J-

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2017 0
New Here ,
Nov 09, 2017

Copy link to clipboard

Copied

Hi Joel, still me

soon I will have to give to the collegue the ability to modify PDFs, combining an original pdf file with an header pdf page and a footer one.

So, at least at this stage, it could be feasible, also for a very beginner like me...hope...

I had not yet time to read all the docs you suggested me, will do soon, but meanwhile i'd like to understand a couple of things:

1. the javascript code I will write, where will be saved? and how will I recall it to be launched?

2. they are buying the full (write) version of adobe acrobat, to produce pdf: is it strictly needed or something more light is enaugh? What i exactly need to do that thing?

thanks a lot for your help and patience...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
Adobe Community Professional ,
Nov 09, 2017

Copy link to clipboard

Copied

1) That depends. JavaScript can be stored in fields, buttons, links, bookmarks, attached to events like page open and close, will print and did print etc. You'll need to read through the documentation and decide which is best for your application.

2) You'll need the Pro version to add JavaScripts and you'll need to pay special attention to what features you program so that you won't try to do something that your audience can't with their viewer. For example, Pro can add fields to a document, Standard can't. Standard can add watermarks, Reader can't. Adding Javascript doesn't turn these features on. JavaScript can only do what the application does.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
Most Valuable Participant ,
Nov 09, 2017

Copy link to clipboard

Copied

2. Small correction: Acrobat Standard can add form fields. Even Reader can, although it's not simple.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
Adobe Community Professional ,
Nov 09, 2017

Copy link to clipboard

Copied

Wait. What? Are you thinking from a template? Please elaborate.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
Most Valuable Participant ,
Nov 09, 2017

Copy link to clipboard

Copied

In Reader? From a template is one option, or by using a script.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
New Here ,
Nov 09, 2017

Copy link to clipboard

Copied

excuse me, i would need a further clarity about point 1

I write the script and save it in some way in the pdf document on which it has to be lauched or I have to save it into a kind of adobe envirnoment and I can run this script for every pdf?

sorry but really new for me...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0
Adobe Community Professional ,
Nov 09, 2017

Copy link to clipboard

Copied

pdfscripting.com has a lot of good tutorials.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 09, 2017 0