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.
edvschu
User
Posts: 127 Joined: Fri Jun 25, 2010 6:54 am
Post
by edvschu » Wed Aug 02, 2017 7:32 am
Hello,
i open a PDF with:
Code: Select all
m_pdfCtl.OpenDocFromPath(DocumentFileName, oReadOnlyParams)
Change tab title can do with:
Code: Select all
pdfCtl.Doc.CoreDoc.Props.ViewPrefFlag(PDFXEdit.PXC_DocumentViewFlags.DocViewFlag_DisplayDocTitle) = True
pdfCtl.Doc.CoreDoc.SrcInfo.CustDispTitle = sTitle
Dim evtID = pdfCtl.Inst.Str2ID("e.document.propsChanged", False)
Dim unkPtr As IntPtr = System.Runtime.InteropServices.Marshal.GetIUnknownForObject(pdfCtl.Doc)
Dim evt As PDFXEdit.IEvent = pdfCtl.Doc.EventServer.CreateNewEvent(evtID, CUInt(unkPtr), CUInt(PDFXEdit.PXC_DocumentViewFlags.DocViewFlag_DisplayDocTitle))
pdfCtl.Doc.EventServer.FireEvent(evt, pdfCtl.Doc)
But open as read only let not change tab title. Is there another way to solve this?
Best Regards,
edvschu
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Contact:
Post
by Sasha - Tracker Dev Team » Wed Aug 02, 2017 9:23 am
Hello edvschu,
Well, you are opening a document as ReadOnly - how it should be possible to change something then?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127 Joined: Fri Jun 25, 2010 6:54 am
Post
by edvschu » Wed Aug 02, 2017 9:59 am
I already know that this does not match. But in old Viewer SDK it was possible.
The background is that no changes to the PDF are allowed. At the same time,
however, a different name should be displayed in the tab.
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Contact:
Post
by Sasha - Tracker Dev Team » Wed Aug 02, 2017 12:30 pm
Try changing the IUIX_LayoutItem::Title like you are changing the Tooltip.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127 Joined: Fri Jun 25, 2010 6:54 am
Post
by edvschu » Thu Aug 03, 2017 11:51 am
Is working. Thanks for the hint.