Hello,
I am looking to save all attributes associated with a Text annotation so that I can then later use them to create the Text annotation again. I've noticed that the location of the popup changes if the popup is not open when saving the settings. If the popup is open, everything behaves as expected.
Here is what I am doing:
creating a Text annotation
entering text into the popup
closing the popup
saving the attributes for the text annotation
creating a new Text annotation from those attributes
double-clicking on the Text annotation to make the popup display
When I do this, the popup appears to the far right side of my document, not where it was when I closed it.
Here is how I am creating the Text annotation:
var annot = this.addAnnot({
page: 0,
author: "chq-dang",
fillColor: ["T"],
noteIcon: "Comment",
opacity: 1,
popupOpen: false,
popupRect: [242.1734597156398,467.5,392.1734597156398,547.5],
rect: [188.94028436018957,384.75,208.94028436018957,402.75],
strokeColor: ["T"],
type: "Text"});
var spans = new Array();
spans[0] = new Object();
spans[0].alignment = "left";
spans[0].fontFamily = "Arial";
spans[0].fontStyle = "normal";
spans[0].fontWeight = 400;
spans[0].text = "Location here";
spans[0].textColor = ["RGB",0,0,0];
spans[0].textSize = 12;
annot.richContents = spans;
It seems that the popupRect values are being ignored when the popupOpen attribute is false (it works just fine when popupOpen is true).
Am I doing something wrong?
Popup location for Text annotation
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Popup location for Text annotation
We couldn't reproduce problem with popup location. Your script working as expected for me - it sets correctly the custom popup location for new annot. Maybe you are using an older build?
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 34
- Joined: Wed Oct 09, 2013 5:58 pm
Re: Popup location for Text annotation
I am using build 2.5.210. What is the latest version?
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Popup location for Text annotation
Hi Daniel,
The latest build is 213.1:
https://www.pdf-xchange.com/product/pdf ... ctivex-sdk
Regards,
Stefan
The latest build is 213.1:
https://www.pdf-xchange.com/product/pdf ... ctivex-sdk
Regards,
Stefan
-
- User
- Posts: 34
- Joined: Wed Oct 09, 2013 5:58 pm
Re: Popup location for Text annotation
I downloaded the most recent build, but an still seeing a problem. I realized there was one step missing from my steps:
create a Text annotation
enter text into the popup
move the popup
close the popup
save the attributes for the text annotation
create a new Text annotation from those attributes
double-click on the Text annotation to make the popup display
Moving the popup is what I had left out before.
create a Text annotation
enter text into the popup
move the popup
close the popup
save the attributes for the text annotation
create a new Text annotation from those attributes
double-click on the Text annotation to make the popup display
Moving the popup is what I had left out before.
-
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
Re: Popup location for Text annotation
Hi Daniel,
Hopefully understood right - you've managed to solve the issue?
Cheers,
Hopefully understood right - you've managed to solve the issue?
Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
-
- User
- Posts: 34
- Joined: Wed Oct 09, 2013 5:58 pm
Re: Popup location for Text annotation
I have taken a different direction regarding saving/recreating annotations. As a result, this is no longer an issue for me.
Thanks for looking into this issue.
Thanks for looking into this issue.
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am