Skip to main content
New Participant
May 30, 2024
Answered

Rotate comment in Adobe Acrobat Pro

  • May 30, 2024
  • 3 replies
  • 1762 views

Hi All,

 

I'm copying and pasting comments from one pdf file to another. When I paste comments to the destination file the comments are being rotated.

 

I found a couple of youtube videos showing how to use the JavaScript Debugger to select and then rotate the comment using the following command:

 

This.SelectedAnnots[0].rotate=90;

 

The probelm is when I select the comment (not text) and then execute using Ctrl+Enter i get the following error:

 

ReferenceError: This is not defined
1:Console:Exec
undefined

 

Just wondering if someone can provide some assisstance?

 

Thanks!

Correct answer PDF Automation Station

As well as the S in "selected".

3 replies

Participating Frequently
January 29, 2025

It is quite wild that one must use scripting language to perform a common operation like rotating a comment...  This should apply to all comment objets : lines, squares, clouds, arrows, etc. Does Adobe now we are trying to work with these tools? I guess not...

try67
Community Expert
May 30, 2024

If you don't want to do it one at a time you can use this code to rotate all of them in one fell swoop:

 

var annots = this.getAnnots();
for (var i in annots) annots[i].rotate=90;
PDF Automation Station
Community Expert
May 30, 2024

The T in "this" needs to be lower case.

PDF Automation Station
Community Expert
May 30, 2024

As well as the S in "selected".

New Participant
May 30, 2024

Thank you!