e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document SOLVED
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.
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.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
Hi Support,
I'm using e.pagesView.ready to add/remove some commands from PagesView CmdPaneBottom.
For "normal" document I would catch e.pagesView.ready and remove/add commands from the only CmdLine it is there:
In the above I'm removing "cmdbar.docOptions".
I want to do the same for the "compare result" document - but when e.pagesView.ready fires for it - the CmdPaneBottom has no lines - even though they do appear on UI.
What event to catch to do the needed ?
p.s.
For normal documents CmdPaneTop has no lines.
For "compare result" Top pane has comparison commands (sidebyside, new, old, next change...) - however CmdPaneTop.Count also returns 0.
p.s.2
I do not want to remove that bar permanently for all documents (but per document), therefore cannot use Inst.ShowCmdBar().
-žarko
I'm using e.pagesView.ready to add/remove some commands from PagesView CmdPaneBottom.
For "normal" document I would catch e.pagesView.ready and remove/add commands from the only CmdLine it is there:
In the above I'm removing "cmdbar.docOptions".
I want to do the same for the "compare result" document - but when e.pagesView.ready fires for it - the CmdPaneBottom has no lines - even though they do appear on UI.
What event to catch to do the needed ?
p.s.
For normal documents CmdPaneTop has no lines.
For "compare result" Top pane has comparison commands (sidebyside, new, old, next change...) - however CmdPaneTop.Count also returns 0.
p.s.2
I do not want to remove that bar permanently for all documents (but per document), therefore cannot use Inst.ShowCmdBar().
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
The 'comparison-docs-report' document is visualized in special way and has special panes layout. The its main pane has ID="cmpDocsPagesView". And this pane contains cmdbar.cmpDocsRes on the top and cmdbar.docOptions, cmdbar.pageNav, cmdbar.pageLayout, cmdbar.pageZoom, cmdbar.launchApp on the bottom. So in this case you need to catch the e.documentView.ready and then:
HTH.
Code: Select all
docView = (IPXV_DocumentView)pFrom;
IPXV_View view = docView.ActiveView[Str2ID("cmpDocsPagesView")];
if (view)
{
view.CmdPaneBottom;
...
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
Vasyl,
Great, thanks, will try.
Btw, how do I check if a document is a "compare document"?
(say also a compare doc created by Ad*be)
-žarko
Great, thanks, will try.
Btw, how do I check if a document is a "compare document"?
(say also a compare doc created by Ad*be)
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
You may check it via:
bool bIsCmpReport = docView.ViewType == PXV_DocumentViewType_CmpReport;
OR (equivalent):
cmpView = docView.ActiveView[Str2ID("cmpDocsPagesView")];
bool bIsCmpReport = (cmpView != null);
bool bIsCmpReport = docView.ViewType == PXV_DocumentViewType_CmpReport;
OR (equivalent):
cmpView = docView.ActiveView[Str2ID("cmpDocsPagesView")];
bool bIsCmpReport = (cmpView != null);
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
Hi Vasyl,
Thanks.
I've already tested the ViewType (PXV_DocumentViewType) expecting to have PXV_DocumentViewType_CmpReport for "compare results" document - but the result is always PXV_DocumentViewType_Normal. So, maybe a bug?
The "cmpView = docView.ActiveView[Str2ID("cmpDocsPagesView")];" does work as you suggested.
Anyhow, how to check on the Core (or pxs) level if a document is a "comparison doc"?
p.s.
I see when opening a comparison document done using Ad*be - you properly figure out it is such a document.
-žarko
Thanks.
I've already tested the ViewType (PXV_DocumentViewType) expecting to have PXV_DocumentViewType_CmpReport for "compare results" document - but the result is always PXV_DocumentViewType_Normal. So, maybe a bug?
The "cmpView = docView.ActiveView[Str2ID("cmpDocsPagesView")];" does work as you suggested.
Anyhow, how to check on the Core (or pxs) level if a document is a "comparison doc"?
p.s.
I see when opening a comparison document done using Ad*be - you properly figure out it is such a document.
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
Unfortunately there is a bugI've already tested the ViewType (PXV_DocumentViewType) expecting to have PXV_DocumentViewType_CmpReport for "compare results" document - but the result is always PXV_DocumentViewType_Normal. So, maybe a bug?
We will fix it in the near future.
You may try this:Anyhow, how to check on the Core (or pxs) level if a document is a "comparison doc"?
Code: Select all
bool bIsCmpReport = false;
IPXC_Document coreDoc;
...
IPXS_Document cosDoc = coreDoc.CosDocument;
cosDoc.LockDocument();
IPXS_PDFVariant root = cosDoc.Root;
if (root != null)
{
IPXS_PDFVariant pieceInfo = root.Dict_Get("PieceInfo");
if (pieceInfo != null)
bIsCmpReport = pieceInfo.Dict_Get("ComparePDF") != null;
}
cosDoc.UnlockDocument();
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
- TrackerSupp-Daniel
- Site Admin
- Posts: 8438
- Joined: Wed Jan 03, 2018 6:52 pm
e.pagesView.ready / CmdPaneBottom / CmdLine(s) missing for "compare results" document
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com