Annotation support in JavaScript (import/export)

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

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

RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Annotation support in JavaScript (import/export)

Post by RudolfErnst »

Hi,

are there any plans to support import/export-annotation-methods in JavaScript like exportAsXFDF and importAnXFDF?

kind regards
Rudi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Annotation support in JavaScript (import/export)

Post by Ivan - Tracker Software »

yes, functions exportAsFDF, exportAsFDFStr, exportAsText, exportAsXFDF, exportAsXFDFStr and corresponding import functions should be added into build 41.
PDF-XChange Co Ltd. (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.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

I am very pleased to hear that because we have to decide until end of october whether we can replace Acrobat by PDF-XChange next year.

Can you tell me what's the schedule for build 41?

regards
Rudi
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Annotation support in JavaScript (import/export)

Post by John - Tracker Supp »

Hi Rudolph,

typically new builds are approx every 6-8 weeks - build 40 is now in beta and being tested - should you wish to do so ...

https://forum.pdf-xchange.com/ ... =35&t=4858

the above is the end user release only for now.
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
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

Hello again,

are there some news about the release date of build 41. My customer is getting increasingly worried about our deadline. They like to see the annotation functionality but I'm not able to deliver it.

kind regards
Rudi
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Annotation support in JavaScript (import/export)

Post by John - Tracker Supp »

Hi,

Build 41 is currently in beta testing with end users and will be released this weekend as a final product for all users.
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
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

This weekend. Are you sure?

regards
Rudi
Tom - Tracker

Re: Annotation support in JavaScript (import/export)

Post by Tom - Tracker »

Rudi

As explained on other threads these things have a way of throwing up problems towards the end - we always endeavour to meet the date we give for new releases. :)
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

Ok, then I have to wait.

In the meantime I installed the the beta version of build 41 to have a try of the new imort/export annotation methods.

To export my annotations I use the JavaScript method:

Code: Select all

app.activeDocs[0].exportAsXFDF(true,true,\"Test.xfdf\",true)
which gives me the error message

Code: Select all

NotAllowedError: Security settings prevent access to this property or method.
Question: Do I have to set some security flags to enable this or is my method call wrong or ....

To import my annotations I use the JavaScript method:

Code: Select all

app.activeDocs[0].importAnXFDF(\"Test.xfdf\")
which gives me the error message

Code: Select all

TypeError: app.activeDocs[0].importAnXFDF is not a function
The release notes for build 41 say also nothing about import annotations. Is this method not included in build 41?

kind regards and any help appreciated
Rudi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Annotation support in JavaScript (import/export)

Post by Ivan - Tracker Software »

Error message

Code: Select all

NotAllowedError: Security settings prevent access to this property or method.
can occur when a document is secured and you have no permission to export data from this PDF file. You can check this on the Security page of the document properties.

importAnXFDF is available only starting from build 41.1 (not released yet). But importAnXFDF and importAnFDF functions for now will import only forms fields data. no annotations, scripts, pages etc. Support of these features will be realized in build 42.
PDF-XChange Co Ltd. (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.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

Ivan - Tracker Software wrote:Error message

Code: Select all

NotAllowedError: Security settings prevent access to this property or method.
can occur when a document is secured and you have no permission to export data from this PDF file. You can check this on the Security page of the document properties.
Hi Ivan,

my document security settings are: everything is allowed. Is there a special security setting for exporting annotations which is not shown in the "Document-Properties" dialog?

kind regards
Rudi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Annotation support in JavaScript (import/export)

Post by Ivan - Tracker Software »

Can you send me (Ivan@tracker-software.com) your document for checking?
PDF-XChange Co Ltd. (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.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

Hello Ivan,

I sent you the requested pdf file via personal mail.

I did some additional tests with this document and PdfXChange Viewer/Acrobat Reader. When I export the annotations with PdfExchange Free Viewer an correct xfdf file is exported. I can not try this with Acrobat 9 because I have no professional version installed. When I look however at the security settings of the document Acrobat tell me that commenting is not allowed while in PdfXChange everything is allowed but does not work in the ActiveX control. Maybe there is another security setting for annotations/comments which is ignored by the PdfXChange Viewer but not by the ActiveX control.

regards
Rudi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Annotation support in JavaScript (import/export)

Post by Ivan - Tracker Software »

When I look however at the security settings of the document Acrobat tell me that commenting is not allowed while in PdfXChange everything is allowed.
It is because it is Acrobat Reader and it doesn't allow to commenting PDFs. As a result, it shows not real document permission, but this permission together with permission Reader allows you.

I had test here your document with AX and all works well. Only one possible reason I see: into your application which uses AX you had disable all export operations by setting DenyAllExportOperations to true.
PDF-XChange Co Ltd. (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.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: Annotation support in JavaScript (import/export)

Post by RudolfErnst »

DenyAllExportOperations is set to false (0) and now exportAsXFDF works as expected. Thank you very much.

Now I'm waiting (and praying) for build 42 to import these annotations with importAnXFDF.

kind regards
Rudi