Bookmarkspane

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Bookmarkspane

Post by abc123abc123 »

Hi is it possible to edit the Bookmarkspane?

1. I just want to have the Bookmarks without the tools(Edit, new, ...).
Can I do that?

2. I want to set the default textsize a little bit larger.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Hello abc123abc123,

You can enlarge the bookmarks in a test environment, and then export those settings to a data file - and then load the same settings every time you load our Viewer AX. This will effectively result in your bookmarks being initially with the size you want them.
For the other part of your question however - I am afraid that the answer is no - for now you can't control hide those buttons, neither in the end user Viewer, nor through code and the SDK.

Best,
Stefan
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

How can I do that? Is there an method to export and load the datafile?
Sry Im new here.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Hello abc123abc123,

You can export the settings from a stand alone instance of the Viewer, and you can then load the settings via code directly.
Please have a look at 2.2.1.26 LoadSettings in the Viewer's manual.

Best,
Stefan
Tracker
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

Thank you for this hint with the data export.

There is no possibility to edit the bookmarks pane or to create an own one?
So that other users cant edit my bookmarks.


One more Question: In the Bookmarkspane its possible to edit the zoomfactor. Can I also do that in the Commentspane?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Hello abc123abc123
There is no possibility to edit the bookmarks pane or to create an own one?
Not currently I am afraid.
So that other users cant edit my bookmarks.
- you can deactivate commands in our Viewer AX ("rename the selected bookmark" command has an ID of 36023) - so that will prevent the users from renaming the bookmarks in your application, but if they can get a copy of the actual PDF file - they can open it in any PDF Viewing app - and the bookmars will be visible there (they are part of the file) - and if the software allows it - they can still change them.

Another possibility is to hide the bookmarks pane of our Viewer, and create your own, e.g. via using JS - to read the bookmark structure - and generate your own bookmark tree inside your main application - but that will most probably be much more complicated and time consuming.
In the Bookmarkspane its possible to edit the zoomfactor. Can I also do that in the Commentspane?
I don't think you can change the zoom for comments in the current version of the Viewer - the font size there would be governed by the general font settings in the viewer - you can customize that via "Edit -> Preferences -> Customize UI" in the end user Viewer, before exporting the settings to data file.

Best,
Stefan
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

Thank you for your answer. Its an Viewer which will run on an machine. There i only have this Viewer so it will be the solution to deactivate the edit modus...

The fontsize is a good idea.

Thank you
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Pleasure to help abc123 :)

Please keep us updated with how your project goes!

Best,
Stefan
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

now I want to deactivate some functions. I tried it with some events but nothing worked.
I also found something that says: DenyAllModifyOperations.

can you please tell me how meant it. I want to Deactivate all operations that allow modifiyng the pdf file. Also Bookmarks and Comments.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Hello abd123,

Have you checked section 3.5 Of the Viewer AX SDK Manual? It shows you "How to Disable a Command?".

The "DenyAllModifyOperations" you can set through e.g. the SetProperty method.

Best,
Stefan
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

Thanks I didnt found this point.

Now I think all problems are solved. We think about it to buy that sdk. It works quite well.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Bookmarkspane

Post by Stefan - PDF-XChange »

Glad to hear that abc123,

And glad that my help made you take this decision!

Regards,
Stefan
Tracker
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Bookmarkspane

Post by Vasyl - PDF-XChange »

Hi, abc123abc123.

To disable editing you may use:

Code: Select all

pdfViewer.SetProperty("General.DenyAllModifyOperations", "true", 0); // disables editing for all documents
// or
pdfViewer.SetDocumentProperty(docID, "ReadOnly", "true", 0); // disables editing for specified document
// or switch off the specified UI-commands:
pdfViewer.SetProperty("Commands[#36006].State", "Offline", 0); // disables the "Delete Bookmarks" cmd-item
pdfViewer.SetProperty("Commands[#36006].State", "Offline", 0); // disables the "Delete Bookmarks" cmd-item
pdfViewer.SetProperty("Commands[#36008].State", "Offline", 0); // disables the "New Bookmark..." cmd-item
pdfViewer.SetProperty("Commands[#36026].State", "Offline", 0); // disables the "Apply Default Appearance..." cmd-item for bookmarks
pdfViewer.SetProperty("Commands[#36023].State", "Offline", 0); // disables the "Rename Bookmark..." cmd-item
To change the font size in bookmarks-pane only - call it before(!) opening first document:

Code: Select all

double zoom = -2.0; // enlarge to 200% percents (-1.0 == 100%)
pdfViewer.SetProperty("Documents.LastView.Bookmarks.FontSize", zoom, 0);
HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

Vasyl-Tracker Dev Team wrote:Hi, abc123abc123.
...
To change the font size in bookmarks-pane only - call it before(!) opening first document:

Code: Select all

double zoom = -2.0; // enlarge to 200% percents (-1.0 == 100%)
pdfViewer.SetProperty("Documents.LastView.Bookmarks.FontSize", zoom, 0);
HTH.
This code works just fine. I tried to look for more properties of the Bookmarks object, but in the help I couldnt' find anything nor the FontSize.
Can you give me a list of the available properties?

Is that possible for the search pane too?
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Bookmarkspane

Post by Vasyl - PDF-XChange »

You could apply some customizations to the bookmarks pane like this:

Code: Select all

// set text size:
double zoom = -2.0; // enlarge to 200% percents (-1.0 == 100%)
pdfViewer.SetProperty("Documents.LastView.Bookmarks.FontSize", zoom, 0);
double fontSizeInPt = 14.0; // set to 14 pt exactly
pdfViewer.SetProperty("Documents.LastView.Bookmarks.FontSize", fontSizeInPt, 0);
// switch on/off text wrapping
pdfViewer.SetProperty("Documents.LastView.Bookmarks.WrapTitles", "false", 0); // to off
// show/hide icons
pdfViewer.SetProperty("Documents.LastView.Bookmarks.ShowIcons", "false", 0); // to hide
Is that possible for the search pane too?
- No, it's impossible currently.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

thanks for the hints.

I tried "pdfViewer.SetProperty("Documents.LastView.Bookmarks.ShowIcons", "false", 0);" to hide but there I will always get an com exception.
I use version 2.5.199.0 of the activeX sdk.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Bookmarkspane

Post by Vasyl - PDF-XChange »

Sorry, my mistake, the correct code:

Code: Select all

pdfViewer.SetProperty("Documents.LastView.Bookmarks.WrapTitles", 0, 0); // to off, use 0 or 1 instead "false"/"true"
pdfViewer.SetProperty("Documents.LastView.Bookmarks.ShowIcons", 0, 0); // to hide, use 0 or 1 instead "false"/"true"
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
abc123abc123
User
Posts: 35
Joined: Mon Oct 17, 2011 2:36 pm

Re: Bookmarkspane

Post by abc123abc123 »

Tracker Supp-Stefan wrote:Hello abc123abc123
There is no possibility to edit the bookmarks pane or to create an own one?
Not currently I am afraid.
So that other users cant edit my bookmarks.
- you can deactivate commands in our Viewer AX ("rename the selected bookmark" command has an ID of 36023) - so that will prevent the users from renaming the bookmarks in your application, but if they can get a copy of the actual PDF file - they can open it in any PDF Viewing app - and the bookmars will be visible there (they are part of the file) - and if the software allows it - they can still change them.

Another possibility is to hide the bookmarks pane of our Viewer, and create your own, e.g. via using JS - to read the bookmark structure - and generate your own bookmark tree inside your main application - but that will most probably be much more complicated and time consuming.
In the Bookmarkspane its possible to edit the zoomfactor. Can I also do that in the Commentspane?
I don't think you can change the zoom for comments in the current version of the Viewer - the font size there would be governed by the general font settings in the viewer - you can customize that via "Edit -> Preferences -> Customize UI" in the end user Viewer, before exporting the settings to data file.

Best,
Stefan
Your suggestion to build a own tree would be the best solution for my requirements, but I'm not sure how I can do this? You wrote JS...???
Please can you give me a hint how I can get back a list of bookmarks to build with it my own tree?
Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Re: Bookmarkspane

Post by Dorwol »

Tracker Supp-Stefan wrote:You can export the settings from a stand alone instance of the Viewer, and you can then load the settings via code directly.
Please have a look at 2.2.1.26 LoadSettings in the Viewer's manual.
If I export this settings as file. The resultet file is a data file.
How can I then read from this the bookmarks as plain Text for my own treeview control?
Sorry, but I don't understand this.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Bookmarkspane

Post by John - Tracker Supp »

Can we please keep comment on this topic here :

https://forum.pdf-xchange.com/ ... 36&t=12395

unless you feel it imperitive to open a new thread:
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Bookmarkspane

Post by Vasyl - PDF-XChange »

If I export this settings as file. The resultet file is a data file.
How can I then read from this the bookmarks as plain Text for my own treeview control?
No, the settings file (.dat) contains all preferences only of our control but not any document-specific data such as bookmarks, annotations, pages. etc...
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Re: Bookmarkspane

Post by Dorwol »

Vasyl-Tracker Dev Team wrote:
No, the settings file (.dat) contains all preferences only of our control but not any document-specific data such as bookmarks, annotations, pages. etc...
OK, then at least I know before, that I must concentrate on a solution using SDK tools.
So sorry for my question here - and I go back to this Thread: https://forum.pdf-xchange.com/ ... 36&t=12395
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Bookmarkspane

Post by John - Tracker Supp »

Ok - so this one is closed :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com