Turning/Twisting Annotations

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Hwb
User
Posts: 3
Joined: Tue Oct 11, 2011 3:03 pm

Turning/Twisting Annotations

Post by Hwb »

Is there a possibility to twist/turn annontaions/markups?
i.e. the type writer can insert the text only in a horizontal manner. I would like to turn it 60°...
Any ideas?

Many thanks in advance!
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7443
Joined: Wed Mar 25, 2009 10:37 pm

Re: Turning/Twisting Annotations

Post by Paul - PDF-XChange »

Hi Hwb,

this feature is to be included in V3 of the Viewer later this Autumn.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Re: Turning/Twisting Annotations

Post by Stefan - PDF-XChange »

Hello Hwb,

Currently there is no way to rotate the whole typewritten object in our Viewer.
We are working on adding object rotation in ver3 of our Viewer but until then you could try the following JS code (you can open the console with Ctrl + J):

Code: Select all

var annot = this.getAnnots(0);
for(var i=0; i<annot.length; i++){
  annot[i].rotate=60;
}
Which will rotate all the text inside text annotations on page 1 60 degrees counterclockwise. You can change the page affected by changing the number in this.getAnnots() - 0 is for page 1 , 1 is for the second page etc..

Please be aware that the result will also require some manual editing of the text box to accommodate the rotated text fully - You will need to add a few spaces at the start of the line as well as new lines on top of it to make it fully visible inside the text box tool - so I would recommend this only for testing and not as a long term solution.

Best,
Stefan
Hwb
User
Posts: 3
Joined: Tue Oct 11, 2011 3:03 pm

Re: Turning/Twisting Annotations

Post by Hwb »

Many thanks to Paul and Stefan. Especially for the javascript hint.
Hwb.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7443
Joined: Wed Mar 25, 2009 10:37 pm

Re: Turning/Twisting Annotations

Post by Paul - PDF-XChange »

:)
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Hwb
User
Posts: 3
Joined: Tue Oct 11, 2011 3:03 pm

Re: Turning/Twisting Annotations

Post by Hwb »

The javascript is working. Unfortunately, it's not possible to resize the text field to see all text. The upper right corner of the text field seems to be the anchor of the text. So, by turning the text 60° most of the text is outside the text field. Resizing the field on all edges and corners doesn't help. It's always outside... :-(
I suppose I'll have to wait for version 3.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Re: Turning/Twisting Annotations

Post by Stefan - PDF-XChange »

Hello Hwb,

Once you have the text rotated - try adding new lines on top of the line you want visible, and also maybe some spaces before the text - check the attached example: Double click the text - and then press Ctrl + A to select all of it - to see the new lines I had to add.

As I mentioned before - this is tricky to be used as it is at the moment, so I would not say it's suitable for everyday and frequent use.

As a side note - rotations on 5-10 degrees usually don't need such manipulations, so that's pretty useful if you want to type "in line" with a scanned form that was slightly tilted during scanning - this is where I use this script most.

Best,
Stefan
You do not have the required permissions to view the files attached to this post.