Emulate cpdf upright function in Acrobat Javascript (set page rotation to 0 but compensate scaling to have unchanged appearance)

New Here ,
Aug 09, 2019 Aug 09, 2019

Copy link to clipboard

Copied

Hi,

I am looking for a solution to integrate directly in a script in Acrobat the equivalent of the "upright" function in cpdf, which sets the page rotation to 0 but also rescales the page (mediabox). The result is that the appearance of the page does not change, but the page rotation can be set to 0 on every page.

(The reason I need this is I am developing a system to automatize the placement of dynamic stamps on multiple files. For now I use "if" to have different settings for each possible rotation setting, but it's not a very clean solution, I would prefer to have the files standardized beforehand to obtain only A4 portrait pages with page rotation set to 0).

Thank you in advance for your help.

TOPICS
Acrobat SDK and JavaScript

Views

63

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 ,
Aug 09, 2019 Aug 09, 2019

Copy link to clipboard

Copied

LATEST

Not possible in JavaScript. A C++ plug-in could do it, but it is two entirely different functions (edit page content to emulate rotation; then set media box).

Bear in mind, in case it is relevant, that Acrobat (unlike some PDF dev tools) is not for server use: not technically suitable and not licensed.

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