script to place numbering on left of page? Acrobat Pro DC

New Here ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

I have a PDF of a few hundred pages, where I want to add continous numbering on the left the page (the pages are mixed portrait and landscape in the same PDF). The line numbers don't have to match with the actual text on the page. Does anyone have any example code from a script that could do this in Acrobat Pro DC? 

 

I know line numbering can be difficutl in PDF, but this should be an easier task, as the numbers don't have to match with the actual text on the page. I could obviously do this manually - page by page, but it would be very tedious, so am looking for a script to do this.

 

Below is an example of what I want to achieve.  Please dont suggest overlaying an image over the pages.  I want to do this by using a script to apply numbers.

numbers.png

TOPICS
How to, JavaScript

Views

44

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
community guidelines
Most Valuable Participant ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

You can do it using the addField method. Create a long, multi-line text field and apply this string as its value.

See the JavaScript for Acrobat API Reference for more details on how to use this method.

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
community guidelines
New Here ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

Do you have an example of code?

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
community guidelines
Most Valuable Participant ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

There are examples in the reference.

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
community guidelines
New Here ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

LATEST

I dont see an example of this

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
community guidelines