Problems with Javascript engine

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Problems with Javascript engine

Post by docu-track99 »

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"]});
Tom - Tracker

Re: Problems with Javascript engine

Post by Tom - Tracker »

docu-track99

Thanks for letting us know - I will make the development team aware.
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Problems with Javascript engine

Post by docu-track99 »

Is there any information on when this issue might be addressed?
User avatar
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

Post by Ivan - Tracker Software »

Fixed into build 39.
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.
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Problems with Javascript engine

Post by docu-track99 »

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.
Attachments
Example.zip
(31.84 KiB) Downloaded 148 times
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Problems with Javascript engine

Post by John - Tracker Supp »

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
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Problems with Javascript engine

Post by docu-track99 »

The newest build of the viewer is still doing this. (2.0.39.2)
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Problems with Javascript engine

Post by docu-track99 »

Is there any new information about this issue?
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Problems with Javascript engine

Post by Vasyl-Tracker Dev Team »

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.
Post Reply