Custom title in tab header?

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

cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Custom title in tab header?

Post by cew »

Hi there,

how can I set a custom title in the tab header in MDI-mode?

Background:
All my documents have a guid as filename.
So I have to set the tab title manually to a readable one.

How can this be done?

Best regards
cew
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Custom title in tab header?

Post by Vasyl - PDF-XChange »

Hi, cew.

You may change the "display file name" property of document:

Code: Select all

object dataIn = "XXXX"; // your custom name, can be 'faked' full file name: "X:\VirtDir1\VirtDir2\XXXX.pdf"
axCoPDFXCview1.SetDocumentProperty(docId, "DispFileName", dataIn, 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.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Custom title in tab header?

Post by cew »

Nice hack, thanks!

BUT: In the thumbnail (displayed on mouse over the tab) the displayed path is now also the fake one ... :(

Another idea to avoid this?

Btw: is it possible to disable the path output in the thumbnail?

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

Re: Custom title in tab header?

Post by Vasyl - PDF-XChange »

Hi, cew.
In the thumbnail (displayed on mouse over the tab) the displayed path is now also the fake one ... :(
Another idea to avoid this?
Btw: is it possible to disable the path output in the thumbnail?
You may to disable tab thumbnail only:

Code: Select all

ctrl.SetProperty("View.ShowTabThumbnails", "false", 0)
----
Or you may use diff method:
set the custom title for your pdfs ([Menu/File/Document Properties/Document Info/Title]), set special option to displaying your custom title in [..Document Properties/Initial View/Window Options/ShowInTitle="Document Title"] save document with this changes, and do not set the "DispFileName" property for opened document.

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.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Custom title in tab header?

Post by cew »

Nice try, but I can't modify all documents before I load them into the viewer.
And I would need a cache for existing pdf titles to be able to restore the pdf before saving... and so on...

There's a command missing like "SetTabTitle"... :cry:

Best
cew
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Custom title in tab header?

Post by John - Tracker Supp »

We will see what can be done in a future release - for now we are working on Version 3 and trying to avoid all but critical issues in the current version, so it will not I am sure be possible until Version 3 at the earliest.
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
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Custom title in tab header?

Post by cew »

That's a clear statement :)

Then let's wait for the ultimate version 3 :wink:

Best regards
cew
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Custom title in tab header?

Post by John - Tracker Supp »

Appreciate your patience Cew :)
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