Settings

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
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Settings

Post by jeffp »

Where I can find a description and comprehensive list of all the settings I can access like 'Docs.SingleWnd' and 'Docs.HideSingleTab' below.

FControl.Inst.Settings['Docs.SingleWnd'].v := False;
FControl.Inst.Settings['Docs.HideSingleTab'].v := False;

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

Re: Settings

Post by Sasha - Tracker Dev Team »

Hello Jeff,

We are planning to write some sort of CAB viewer for C# so that you would be able to look into all of the settings structure. It is almost done, though we have several problems that still require solving.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

I'm using Delphi, so will it be a compiled exe I can run so I can still run it and use it?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Settings

Post by Sasha - Tracker Dev Team »

Hello Jeff,

We probably also can implement something like this.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

I can open the C# source files and view them, so if the settings info will be there in the code, that should be fine. I just can't compile them.

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

Re: Settings

Post by Sasha - Tracker Dev Team »

Well we were planning to do some C# code debug viewer as a part of the project, meaning that you could look at the nodes when you are debugging the required code. Though in your case the external project that can view all of the Settings would be the only way to do this.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

Looking for some more settings. The following work:

FControl.Inst.Settings['Docs.SingleWnd'].v := False;
FControl.Inst.Settings['Docs.HideSingleTab'].v := False;

But now I need these translated into the new SDK like the above:

(from old Viewer SDK)
FControl.SetProperty('PageDisplay.DefaultZoom', 'FitWidth', 0);
FControl.SetProperty('PageDisplay.DefaultLayout', 'Single', 0);
FControl.SetProperty('PageDisplay.DefaultView', 'ThumbnailsAndPage', 0);
FControl.SetProperty('Documents.RestoreLastPageDisp', 1, 0);
FControl.SetProperty('Documents.RestoreLastView', 1, 0);

A comprehensive list would be great. How's it coming along?

Again, I use Delphi so if it is some kind of property viewer, can you make it a compiled exe.

Thanks.

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

Re: Settings

Post by Sasha - Tracker Dev Team »

Hello Jeff,

We are in the process of the development of the small settings viewer application. It is almost ready, and will be available in the Useful Resources topic soon.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

Until then, can you give me a quick translation of these old ones.

FControl.SetProperty('PageDisplay.DefaultZoom', 'FitWidth', 0);
FControl.SetProperty('PageDisplay.DefaultLayout', 'Single', 0);
FControl.SetProperty('PageDisplay.DefaultView', 'ThumbnailsAndPage', 0);
FControl.SetProperty('Documents.RestoreLastPageDisp', 1, 0);
FControl.SetProperty('Documents.RestoreLastView', 1, 0);
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Settings

Post by Sasha - Tracker Dev Team »

The explorer is out now:
https://forum.pdf-xchange.com/ ... 66&t=28572

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

CABNodeExplorer is great and very useful.

However, I can't find the equivalent of this one:

FOldViewerControl.SetProperty('Documents.RestoreLastPageDisp', 1, 0);

These two are close, but not the same thing.

FControl.Inst.Settings['PagesView.RestoreLastView'].v := True; // true by default
FControl.Inst.Settings['DocView.RestoreLastLayout'].v := True;

I'm using the TPXV_Control in this case as a file previewer. So when I'm viewing a PDF and change the page display to say Fit to Page, I want the same page display when I open the next document.

The old

FOldViewerControl.SetProperty('Documents.RestoreLastPageDisp', 1, 0);

did that for me. I'm looking for the equivalent in the new Editor SDK
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Settings

Post by Sasha - Tracker Dev Team »

Hello Jeff,

Probably you will need to use this setting:
Image
For this you will need to set the DocView.DefaultLayout property with the index from this dropdown (by default it's 0).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Settings

Post by jeffp »

That doesn't work.

I've added some code to save the ZoomMode before I close the document and then reset the ZoomMode after I open the new document.

As I said before, you had a setting in the old viewer SDK that did this automatically.

Also, what is the difference between

FControl.Doc.ActiveView.PagesView.Layout.SetZoom(AZoomMode, AZoomLevel);

and

FControl.Doc.ActiveView.PagesView.SetZoom(AZoomMode, AZoomLevel, True);



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

Re: Settings

Post by Sasha - Tracker Dev Team »

Hello Jeff,

That workaround should do precisely what you wanted.

As for this piece of code:
FControl.Doc.ActiveView.PagesView.Layout.SetZoom(AZoomMode, AZoomLevel);
The PagesView.SetZoom method does the Layout.SetZoom inside of it - it's done for easier usage.

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