c# code for menu command "Export Comments to Data File"
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 91
- Joined: Fri Sep 16, 2016 12:03 am
c# code for menu command "Export Comments to Data File"
Can you please provide the c# code to do what the menu command "Export Comments to Data File"?
Can you please also provide a c# sample code of the menu command "Import Comments"?
I could not find the code in the Fulldemo sample. thanks
Can you please also provide a c# sample code of the menu command "Import Comments"?
I could not find the code in the Fulldemo sample. thanks
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: c# code for menu command "Export Comments to Data File"
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: c# code for menu command "Export Comments to Data File"
Hello Alex,
Just like asamrith@gmail.com, we are also looking for a C# sample for exportCommentsAndFields.
Could it be possible for you to add one for this specific function on the wiki?
Thanks,
Eric
Just like asamrith@gmail.com, we are also looking for a C# sample for exportCommentsAndFields.
Could it be possible for you to add one for this specific function on the wiki?
Thanks,
Eric
-
- User
- Posts: 91
- Joined: Fri Sep 16, 2016 12:03 am
Re: c# code for menu command "Export Comments to Data File"
Search the sdk help on "op.document.exportCommentsAndFields" for explanation of the parameters.
https://sdkhelp.pdf-xchange.com/view/Main_Page
I hope this will help you...cheers
https://sdkhelp.pdf-xchange.com/view/Main_Page
I hope this will help you...cheers
Code: Select all
IOperation op = this.pdfCtl.Inst.CreateOp(this.pdfCtl.Inst.Str2ID("op.document.exportCommentsAndFields", false));
op.Params.Root[(object)"Input"].v = (object)doc;
ICabNode cabNode = (ICabNode)op.Params.Root[(object)"Options"];
cabNode[(object)"ExportAnnots"].v = (object)true;
cabNode[(object)"ExportFields"].v = (object)true;
cabNode[(object)"Format"].v = "FDF";
IAFS_Name name = ((IAFS_Inst)this.pdfCtl.Inst.GetExtension("AFS")).DefaultFileSys.StringToName(fdfFilename, 0, (IAFS_Name)null);
cabNode[(object)"DestFile"].v = (object)name;
op.Do(0);
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: c# code for menu command "Export Comments to Data File"
Thanks for the sample, asamrith@gmail.com
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: c# code for menu command "Export Comments to Data File"
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: c# code for menu command "Export Comments to Data File"
Hi All,
I couldn't seem to export fields (nor annotations) using this example. I tried exporting to various formats but got the same result.
When setting the export type to "XML" I get:
This is the C# that I'm using:
I've attached an example PDF file which contains text content and a single text field.
How can I export all field information?
Most Sincerely
I couldn't seem to export fields (nor annotations) using this example. I tried exporting to various formats but got the same result.
When setting the export type to "XML" I get:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<fields xmlns:xfdf="http://ns.adobe.com/xfdf-transition/"
/>
Code: Select all
IOperation Op = pdfx.Inst.CreateOp(pdfx.Inst.Str2ID("op.document.exportCommentsAndFields", false));
PDFXEdit.ICabNode input = Op.Params.Root[(object)"Input"];
input.v = (object)pdfx.Doc;
PDFXEdit.ICabNode options = Op.Params.Root[(object)"Options"];
PDFXEdit.IAFS_Inst fsInst = (PDFXEdit.IAFS_Inst)pdfx.Inst.GetExtension("AFS");
PDFXEdit.IAFS_Name destPath = fsInst.DefaultFileSys.StringToName(targetFile, 0, (IAFS_Name)null);
options[(object)"DestFile"].v = (object)destPath;
options[(object)"Format"].v = "XML";
options[(object)"ExportFields"].v = (object)true;
options[(object)"ExportAnnots"].v = (object)true;
options[(object)"IncludeEmptyFields"].v = (object)true;
Op.Do();
How can I export all field information?
Most Sincerely
- Attachments
-
- fillable_example.pdf
- text and a fillable field
- (18.8 KiB) Downloaded 88 times
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: c# code for menu command "Export Comments to Data File"
Hello dconner,
From what I see, the ExportCommentsOperation exports annotations only to the FDF and XFDF formats while the FormFields can be exported also into the Text/CSV and XML format. I've asked the developer who implemented this feature about this and will reply here once I have an answer.
Cheers,
Alex
From what I see, the ExportCommentsOperation exports annotations only to the FDF and XFDF formats while the FormFields can be exported also into the Text/CSV and XML format. I've asked the developer who implemented this feature about this and will reply here once I have an answer.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ