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

NotAllowedError for setPageRotations

Guest
Jan 14, 2020 Jan 14, 2020

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

This method is not allowed in Acrobat Reader.

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

Okay, that makes sense.

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

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

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

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

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 ?

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

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

No.

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

Look for the property viewState in the Acrobat Javascript Reference.

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
Guest
Jan 14, 2020 Jan 14, 2020
LATEST

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.

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