Export bookmarks to file does not work

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
prasantha
User
Posts: 43
Joined: Fri Jun 24, 2022 8:15 am

Export bookmarks to file does not work

Post by prasantha »

I need to export the bookmarks to file without opening the pdf in UI. so i used the following code toopen the oped file and export the bookmarks

PXV_Inst _Inst= new PXV_Inst();
var nID = _Inst.Str2ID("op.openDoc", false);
IOperation Op = _Inst.CreateOp(nID);

_fsInst = (IAFS_Inst)_Inst.GetExtension("AFS");
IAFS_Name name = _fsInst.DefaultFileSys.StringToName(FileName);

var input = Op.Params.Root["Input"];
input.v = name;

ICabNode options = Op.Params.Root["Options"];
options["NativeOnly"].v = true;

Op.Do();

ResultDoc = (IPXC_Document)Op.Params.Root["Output"].v;



int exportFlags = (int)(BTTFlags.ebttf_Default | BTTFlags.ebttf_CustomFilename);
var nID1 = _Inst.Str2ID("op.bookmarks.toTextFile", false);
var Op1 = _Inst.CreateOp(nID1);
var input1 = Op1.Params.Root["Input"];
input1.Add().v = ResultDoc;
ICabNode options1 = Op1.Params.Root["Options"];
options1["FilePath"].v = Path.GetDirectoryName(exportFileName);
options1["FileName"].v = Path.GetFileName(exportFileName);
options1["Flags"].v = exportFlags;

options1["Separator"].v = ';';
Op1.Do()

But when I execute the Op1.Do(). It does not return. that mean it does not end the oP1.Do() operation. nether return nor any exception is raised. my application is not responding there.

Can anyone please let me know whats wrong here?
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Export bookmarks to file does not work

Post by Vasyl-Tracker Dev Team »

Hi prasantha.

Sorry for the delay with it... Will check it and let you know about the result.

Cheers.
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.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Export bookmarks to file does not work

Post by Vasyl-Tracker Dev Team »

We checked this feature and couldn't reproduce any issue there. Maybe problem is document-related? Can you try to reproduce it with another doc?
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.
prasantha
User
Posts: 43
Joined: Fri Jun 24, 2022 8:15 am

Re: Export bookmarks to file does not work

Post by prasantha »

If I modified the code so that it uses the edior to open the pdf and use the IPXC_Document , it works.
But i want to open a file internally not in the editor. and export the bookmarks list to a file.

Further I tried to iterate over the bookmark list prograatically

var bmItem = doc.BookmarkRoot;
image.png
From the above code when it execute the code line 393 above it does not return. same behaviour as above.

any input i highly appreciated
prasantha
User
Posts: 43
Joined: Fri Jun 24, 2022 8:15 am

Re: Export bookmarks to file does not work

Post by prasantha »

Vasyl-Tracker Dev Team wrote: Wed Oct 12, 2022 4:57 pm We checked this feature and couldn't reproduce any issue there. Maybe problem is document-related? Can you try to reproduce it with another doc?
Same behaviour for any document. but if i open the document on ediotr programatically and export thebookmarks as above, then it work fine
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Export bookmarks to file does not work

Post by TrackerSupp-Daniel »

Hello, prasantha

I am afraid we still cannot seem to reproduce the issue in the current latest release (364.0). Could I ask if you are certain that you are fully up to date? If not, updating could be the solution you are looking for to resolve this issue.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply