Bookmarks to textfile

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.
troutinger
User
Posts: 8
Joined: Tue Apr 18, 2023 9:18 am

Bookmarks to textfile

Post by troutinger »

Hey,

once the following code extracted the Bookmarks to text:


Inst.StartLoadingPlugins();

string _path = Environment.CurrentDirectory + "\\Bookmarks.pvp";
Inst.AddPluginFromFile(_path);

Inst.FinishLoadingPlugins();

PDFXEdit.IPXC_Inst m_pxcInst = null;
m_pxcInst = (PDFXEdit.IPXC_Inst)Inst.GetExtension("PXC");


PDFXEdit.IPXC_Document Doc = m_pxcInst.OpenDocumentFromFile(source_, null);

uint i_p = Doc.Pages.Count;


int nID = Inst.Str2ID("op.bookmarks.toTextFile", false);
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
var input = Op.Params.Root["Input"];
input.Add().v = Doc;
PDFXEdit.ICabNode options = Op.Params.Root["Options"];

options["FilePath"].v = dest_;
options["FileName"].v = "Bookmarks.txt";


But with the latest SDK, Op is NULL. So it does not work any more.

Can you show me a way with the latest SDK to do the same as shown above?


Thanks a lot,
Michael
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Bookmarks to textfile

Post by Vasyl-Tracker Dev Team »

Hi troutinger.

Sorry for the delay with this one..

We checked this case and couldn't reproduce your issue with the latest 10.2.1.385 build.
Please check if your

Environment.CurrentDirectory + "\\Bookmarks.pvp"

gives you the correct path which points to the existing file. And please be sure that the *.pvp file has the same platform as the main PDFXEditCore.x64.dll / PDFXEditCore.x86.dll.
I.e. for PDFXEditCore.x64.dll you need to use the /Plugins.x64/*.pvp, while for PDFXEditCore.x86.dll - you need /Plugins.x86/*.pvp

HTH.
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.