export fdf witdh atachments

PDF-XChange Editor SDK for Developers

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.
Post Reply
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

export fdf witdh atachments

Post by jusWest »

Hello!

We use this code to export comments to a FDF file:

Code: Select all

                IOperation op = _Inst.CreateOp(_Inst.Str2ID("op.document.exportCommentsAndFields", false));
                op.Params.Root["Input"].v = _Doc;
                ICabNode cabNode = (ICabNode)op.Params.Root[(object)"Options"];
                cabNode["ExportAnnots"].v = true;
                cabNode["ExportFields"].v = true;
                cabNode["IncludeEmptyFields"].v = true;
                cabNode["ExportFieldFlags"].v = true;

                cabNode["Format"].v = "FDF";
                IAFS_Name name = ((IAFS_Inst)_Inst.GetExtension("AFS")).DefaultFileSys.StringToName(FDFfilename, 0, (IAFS_Name)null);
                cabNode["DestFile"].v = name;
                op.Do();
When we export to fdf in the Editor, the file attachments is embedded in the fdf file, but when we use the above code on the same file, the fileattachments are not exported.

Why is that, and how di I fix it?

/Ronny
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

Also the sdk export function does not produce the same fdf data as the editor export does.

se here for an example for the same object in the same pdf file:

Produced by the SDK export:

Code: Select all

2 0 obj
<<
/BS null
/Contents (Ix 11 og 12 Eika Kreditt-\rNazim)
/CreationDate (D:20161102140025+01'00')
/DA (19 TL /Cour 14 Tf)
/DS (font: Helv 14.0pt;font-stretch:Normal; text-align:left; color:#0000FF )
/F 4
/IT /FreeTextTypewriter
/M (D:20161102140047+01'00')
/NM (76a61b5b-7dcd-4584-a95b-e3271e38ca3b)
/Page 133
/RC (<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:11.0.15" xfa:spec="2.0.2"  style="font-size:14.0pt;text-align:left;color:#0000FF;font-weight:normal;font-style:normal;font-family:Helv;font-stretch:normal"><p dir="ltr"><span style="line-height:19.0pt;font-family:Helvetica">Ix 11 og 12 Eika Kreditt-&#13;</span></p><p dir="ltr"><span style="line-height:19.0pt;font-family:Helvetica">Nazim</span></p></body>)
/Rect [141.211 786.554 290.635 824.564]
/Subj (Tekst i maskinskrift)
/Subtype /FreeText
/T (ava012)
/Type /Annot
>>
endobj
Produced by the editor export:

Code: Select all

2 0 obj
<<
/BS 71 0 R
/Contents (Ix 11 og 12 Eika Kreditt-\rNazim)
/CreationDate (D:20161102140025+01'00')
/DA (19 TL /Cour 14 Tf)
/DS (font: Helv 14.0pt;font-stretch:Normal; text-align:left; color:#0000FF )
/F 4
/IT /FreeTextTypewriter
/M (D:20161102140047+01'00')
/NM (76a61b5b-7dcd-4584-a95b-e3271e38ca3b)
/Page 133
/RC (<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:11.0.15" xfa:spec="2.0.2"  style="font-size:14.0pt;text-align:left;color:#0000FF;font-weight:normal;font-style:normal;font-family:Helv;font-stretch:normal"><p dir="ltr"><span style="line-height:19.0pt;font-family:Helvetica">Ix 11 og 12 Eika Kreditt-&#13;</span></p><p dir="ltr"><span style="line-height:19.0pt;font-family:Helvetica">Nazim</span></p></body>)
/Rect [141.211 786.554 290.635 824.564]
/Subj (Tekst i maskinskrift)
/Subtype /FreeText
/T (ava012)
/Type /Annot
>>
endobj
The /BS paramter is Null in the export from the sdk.

Other parameters is also null in other objects exported via the sdk, while having values in the editor export
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Hello jusWest,

Forwarded this to the appropriate developer, will wait for his reply.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

Thank you, the important thing for me now is that the attachments is not exported
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Just to clarify - you mean the attachment annotations?
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

yes, the text data for the atachments is exported:

Code: Select all

70 0 obj
<<
/C [1 1 0]
/F 128
/FS 137 0 R
/Name /Outlook
/NM (5e7f7547-2f66-45c0-a09f-8f4ff6fa377f)
/Page 3161
/Rect 138 0 R
/Subtype /FileAttachment
/Type /Annot
>>
endobj
but not the data between stream and endstream
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

OK, will forward that also.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

heard back yet?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Hello jusWest,

That developer is currently not available - he should be back in a week or so.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

Any word from the developer?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Hello jusWest,

I've reminded him about this one - he'll take a look when he has time.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: export fdf witdh atachments

Post by jusWest »

This is starting too get a litle critical for us, as we need this to work

Can you please see if the developer can give a response soon?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Hello jusWest,

Sadly, he's away for now - from what I know, he should be back again till Friday - I will ask him first time he gets back.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: export fdf witdh atachments

Post by Sasha - Tracker Dev Team »

Hello Ronny,

I've created a sample project and tried to recreate your behavior - no luck. I've tested 333 and 330 build x64.dlls - everything is working properly. Here's a sample project that is doing export and import:
33120.zip
(13.04 KiB) Downloaded 62 times
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply