NotAllowedError for setPageRotations

New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Hello,

 

this.setPageRotations(0, 0, 90); doesn't want to execute because of security settings in Adobe Acrobat Reader DC. Same code works in Adobe Acrobat Pro DC.

Enable global object security policy is off and Enable enhanced security.

TOPICS
Acrobat SDK and JavaScript

Views

127

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

NotAllowedError for setPageRotations

New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Hello,

 

this.setPageRotations(0, 0, 90); doesn't want to execute because of security settings in Adobe Acrobat Reader DC. Same code works in Adobe Acrobat Pro DC.

Enable global object security policy is off and Enable enhanced security.

TOPICS
Acrobat SDK and JavaScript

Views

128

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
Jan 14, 2020 0
Adobe Community Professional ,
Jan 14, 2020

Copy link to clipboard

Copied

This method is not allowed in Acrobat Reader.

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...
Jan 14, 2020 0
New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Okay, that makes sense.

Is there any way then to check when person rotates document?

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...
Jan 14, 2020 0
Most Valuable Participant ,
Jan 14, 2020

Copy link to clipboard

Copied

If they are using Reader, they can't rotate the document, so it doesn't apply. (They can rotate the view).

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...
Jan 14, 2020 0
Adobe Community Professional ,
Jan 14, 2020

Copy link to clipboard

Copied

Look for the property viewState in the Acrobat Javascript 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
Reply
Loading...
Jan 14, 2020 0
New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

I have wrongly formatted my question.

So , how to check if user rotates view ?

Is there any event that occurs when view rotation is changed ?

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...
Jan 14, 2020 0
Most Valuable Participant ,
Jan 14, 2020

Copy link to clipboard

Copied

> Is there any event that occurs when view rotation is changed ?

No.

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...
Jan 14, 2020 0
vuya24 LATEST
New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Property viewState does not have method for rotation.

Workaround is using app.setInterval to check rotation since this.getPageRotation is allowed, not best solution but works.

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...
Jan 14, 2020 0