Problems with Javascript engine
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Problems with Javascript engine
Hello, it appears that there's a few issues with the Javascript engine provided with the PDF-XChange Viewer.
With the following 3 Javascripts I should get 3 very different annotations, but the textFont and textSize properties don't seem to work at all. (All three annotations that are created have the same font and text size.)
It also appears that the fillColor and strokeColor properties aren't working correctly. strokeColor seems to affect the fillColor (what the background of the annotation is like) while the fillColor does nothing.
I've tested this with the latest build (v.2.0038) with the same results.
Javascripts:
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Times,textSize: 12,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["T"],fillColor: ["RGB", 1, 0, 0]});
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Helv,textSize: 12,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["T"],fillColor: ["RGB", 1, 0, 0]});
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Helv,textSize: 8,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["RGB", 1, 0, 0],fillColor: ["T"]});
With the following 3 Javascripts I should get 3 very different annotations, but the textFont and textSize properties don't seem to work at all. (All three annotations that are created have the same font and text size.)
It also appears that the fillColor and strokeColor properties aren't working correctly. strokeColor seems to affect the fillColor (what the background of the annotation is like) while the fillColor does nothing.
I've tested this with the latest build (v.2.0038) with the same results.
Javascripts:
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Times,textSize: 12,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["T"],fillColor: ["RGB", 1, 0, 0]});
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Helv,textSize: 12,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["T"],fillColor: ["RGB", 1, 0, 0]});
var annot = this.addAnnot({type: "FreeText",page: 0,rect: [201,657,281,712],author: "Craig",textFont: font.Helv,textSize: 8,width: 1,contents: "Reviewed By\rCraig\r15Jul08",opacity: 1,alignment: 0,strokeColor: ["RGB", 1, 0, 0],fillColor: ["T"]});
Re: Problems with Javascript engine
docu-track99
Thanks for letting us know - I will make the development team aware.
Thanks for letting us know - I will make the development team aware.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Problems with Javascript engine
Is there any information on when this issue might be addressed?
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Problems with Javascript engine
Fixed into build 39.
But please note: transparent stroke color isn't acceptable for Freetext annotations because this color used also for text drawing.
But please note: transparent stroke color isn't acceptable for Freetext annotations because this color used also for text drawing.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Problems with Javascript engine
The javascript works fine now, but annotations created by javascript with different font sizes than 12 (the default font size) end up getting resized to 12 if you edit them. This is with the current viewer version (2.0.38.1).
I've included a sample PDF of javascript created annotations, if you edit one of the text annotations the font size will change.
I've included a sample PDF of javascript created annotations, if you edit one of the text annotations the font size will change.
- Attachments
-
- Example.zip
- (31.84 KiB) Downloaded 148 times
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Problems with Javascript engine
Please check out the final release of build 39 - available today.
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
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Problems with Javascript engine
The newest build of the viewer is still doing this. (2.0.39.2)
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Problems with Javascript engine
Is there any new information about this issue?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Problems with Javascript engine
This issue will be fixed in next build.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.