Set Position Of Bookmark Pane In Code

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
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Set Position Of Bookmark Pane In Code

Post by plgoldman »

When a new document is open with the PDF-XChange Editor SDK I am currently opening both the "thumbnail pane" and the "bookmark pane." both panes appear on the left hand side of the document view area. The user can move the "bookmark pane to the right side" of the document view area by "grabbing" it with their mouse and dropping it on the attach point on the right hand border of the document view area.

Is there a way to have the "bookmark pane" appear there as part of the Open Document process? I've searched through the forum and noticed others have asked this question and were told that such a feature was coming in a future release. Those comments on a future release are now many years old so I was wondering it it is something that can now be done.

Regards,
Paul
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Set Position Of Bookmark Pane In Code

Post by Sasha - Tracker Dev Team »

Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Set Position Of Bookmark Pane In Code

Post by plgoldman »

Hi Alex,

Thanks for the pointers to the two articles. Actually the first one to move the "stamps palette" to the right hand side of the frame did the trick. I had to change

pdfCtl.Inst.ActiveMainView.Panes.Active[pdfCtl.Inst.Str2ID("stampsView")];

to

pdfCtl.Doc.View[0].Panes.Active[pdfCtl.Inst.Str2ID("bookmarksView")];

and then everything worked perfectly.

Thanks again,
Paul
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Set Position Of Bookmark Pane In Code

Post by plgoldman »

Hi Again Alex,

A follow up question to moving the bookmarks pane.

We now have the ability to move the bookmarks pane in code. As mentioned, when a load document completes and the Active Document View appears the thumbnails are on the left and the bookmarks are on the right. We are calling the setting of the positions of the thumbnails and bookmarks user preferences. In our environment most users want the thumbnails on the left and bookmarks on the right. However, some like the default appearance - both on the left.

So the question now is - once the user has established their preferences is there a way to preserve these preferences when the app is closed and then opened again? For instance, could all of the layout settings be serialized and restored from the serialization?

Thanks,
Paul
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Set Position Of Bookmark Pane In Code

Post by plgoldman »

Once More Hello,

So with some digging we found:

pdfCtl.Inst.SaveUserSettings(pdfCtl.Inst.CreateString(regKey));

pdfCtl.Inst.LoadUserSettings(pdfCtl.Inst.CreateString(regKey));

It seems to do the trick.

I'll let you know how it all works out.

Regards,
Paul
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Set Position Of Bookmark Pane In Code

Post by Sasha - Tracker Dev Team »

Hello Paul,

Yup those are the methods to use in your case.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply