Export/Import annotation as "xfdf"
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Export/Import annotation as "xfdf"
Hi,
I want to export/import annotations from the document as "fdf/xfdf". Referring to the SDK manual, I could n't find anything useful.
Even I tried the following:
document.all.PXCV.RunJavaScript("this.exportAsXFDF(true,true,null, true")
but this is not working (throws unknown exception) as this in turn is referring to Javascript for Adobe Acrobat API. Can anybody tell how to use the "RunJavascript" from PDFxchange viewer or any other way by which I can export/import annotations from the document as "fdf/xfdf" programmatically.
I want to export/import annotations from the document as "fdf/xfdf". Referring to the SDK manual, I could n't find anything useful.
Even I tried the following:
document.all.PXCV.RunJavaScript("this.exportAsXFDF(true,true,null, true")
but this is not working (throws unknown exception) as this in turn is referring to Javascript for Adobe Acrobat API. Can anybody tell how to use the "RunJavascript" from PDFxchange viewer or any other way by which I can export/import annotations from the document as "fdf/xfdf" programmatically.
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi,
The abovementioned error "unknown exception" is resolved. Not the command
document.all.PXCV.RunJavaScript("this.exportAsXFDF(true,true,null,'/annots.xfdf',true)")
runs without any error , but doesn't produce any output xfdf file.
Please guide.
Thanks and Regards,
Sukhmanpreet Kaur
The abovementioned error "unknown exception" is resolved. Not the command
document.all.PXCV.RunJavaScript("this.exportAsXFDF(true,true,null,'/annots.xfdf',true)")
runs without any error , but doesn't produce any output xfdf file.
Please guide.
Thanks and Regards,
Sukhmanpreet Kaur
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Export/Import annotation as "xfdf"
Hello sukhman,
You can export annotations by using this code:
And for import:
Also for ASP.NET you can download sample project from this post:
https://forum.pdf-xchange.com/ ... 995#p28995
You can export annotations by using this code:
Code: Select all
document.all.PDFView.RunJavaScript('this.exportAsFDF(true, true, null, true);');
document.all.PDFView.RunJavaScript('this.exportAsFDF({bAllFields:true, bNoPassword:true, bAnnotations:true});');
document.all.PDFView.RunJavaScript('this.exportAsFDF(true, true, null, true, "/c/annots.fdf", true);');
document.all.PDFView.RunJavaScript('this.exportAsXFDF({bAllFields:true, bNoPassword:true, bAnnotations:true});');
document.all.PDFView.RunJavaScript('this.exportAsXFDF(true, true, null, "/c/annots.xfdf", true);');
Code: Select all
document.all.PDFView.RunJavaScript('this.importAnFDF("/c/annots.fdf");');
document.all.PDFView.RunJavaScript('this.importAnXFDF("/c/annots.xfdf");');
https://forum.pdf-xchange.com/ ... 995#p28995
Last edited by Corwin - Tracker Sup on Wed Jul 22, 2009 2:14 pm, edited 3 times in total.
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi Corwin,
But where will this exported file be saved, coz I tried to run the mentioned script. Althought it runs successfully, but cannot see the exported xfdf anywhere.
Thanks and Regards,
Sukhman
But where will this exported file be saved, coz I tried to run the mentioned script. Althought it runs successfully, but cannot see the exported xfdf anywhere.
Thanks and Regards,
Sukhman
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Export/Import annotation as "xfdf"
Code: Select all
this.exportAsXFDF(true, true, null, "/c/annots.xfdf", true);
Code: Select all
this.exportAsXFDF(true, true, null, "annots.xfdf", true);
HTH
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi Corwin,
Thanks for the reply.
I could export to the specific path with the filename as "annots.xdf" .My requirement is to create the filename at runtime and then pass it to the Export command as follows:
var exprtPath = "e/Test/Test1.xfdf";
document.all.PXCV.RunJavaScript('this.exportAsXFDF(true, true, null,exprtPath, true);');
But this is giving me unknown exception. Please guide.
Thanks and Regards,
Sukhman
Thanks for the reply.
I could export to the specific path with the filename as "annots.xdf" .My requirement is to create the filename at runtime and then pass it to the Export command as follows:
var exprtPath = "e/Test/Test1.xfdf";
document.all.PXCV.RunJavaScript('this.exportAsXFDF(true, true, null,exprtPath, true);');
But this is giving me unknown exception. Please guide.
Thanks and Regards,
Sukhman
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi Corwin,
I could resolve this problem.
Thanks and Regards,
Sukhman
I could resolve this problem.
Thanks and Regards,
Sukhman
-
- User
- Posts: 7
- Joined: Fri Jul 10, 2009 3:54 am
Re: Export/Import annotation as "xfdf"
Hi,
I have problem when i import comments file from server.
this is the path of this file:
http://serverName:port/annots.xfdf
the code is:
document.all.PXCV.RunJavaScript('this.importAnXFDF("http://serverName:port/annots.xfdf");');
I have problem when i import comments file from server.
this is the path of this file:
http://serverName:port/annots.xfdf
the code is:
document.all.PXCV.RunJavaScript('this.importAnXFDF("http://serverName:port/annots.xfdf");');
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi Corwin,
Can we import an "xfdf" file from server URL.
We tried : document.all.PXCV.RunJavaScript('this.importAnXFDF("http://ps5769:3049/Paxonix%20Docs/annots.xfdf");');
But its not giving any output. Please suggest.
Regards,
Sukhman
Can we import an "xfdf" file from server URL.
We tried : document.all.PXCV.RunJavaScript('this.importAnXFDF("http://ps5769:3049/Paxonix%20Docs/annots.xfdf");');
But its not giving any output. Please suggest.
Regards,
Sukhman
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Export/Import annotation as "xfdf"
Hi all,
No, you cannot import FDF or XFDF from server URL.
No, you cannot import FDF or XFDF from server URL.
-
- User
- Posts: 23
- Joined: Fri Jul 03, 2009 6:19 am
Re: Export/Import annotation as "xfdf"
Hi Corwin.
Thanks for the reply.
Regards,
Sukhman
Thanks for the reply.
Regards,
Sukhman
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Export/Import annotation as "xfdf"
pleasure 

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