Selected Pages
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.
Selected Pages
[1]
How can I get all the selected pages from
TPXV_Control?
I can get the current page with
TPXV_Control.CurrentPage
But I don't see where I can get all the selected pages.
[2]
Also, in the old viewer SDK there was a way to change the color of the app workspace. Where is that found in the new SDK?
Thanks.
--Jeff
How can I get all the selected pages from
TPXV_Control?
I can get the current page with
TPXV_Control.CurrentPage
But I don't see where I can get all the selected pages.
[2]
Also, in the old viewer SDK there was a way to change the color of the app workspace. Where is that found in the new SDK?
Thanks.
--Jeff
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Selected Pages
Hello Jeff,
1) To get the Selected Pages you will have to get the pages selection from the needed document. You can do this by using this code:
2) You mean you want to change the Theme programmatically?
Cheers,
Alex
1) To get the Selected Pages you will have to get the pages selection from the needed document. You can do this by using this code:
Code: Select all
int nSel = pdfCtl.Inst.Str2ID("selection.pages");
PDFXEdit.IPXV_DocSelection docSel = pdfCtl.Doc.GetSel(nSel);
PDFXEdit.IPXV_PagesSelection ps = docSel as PDFXEdit.IPXV_PagesSelection;
if (ps != null)
{
PDFXEdit.IPXV_PageIndexesList pagesList = ps.Items;
}
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Selected Pages
Your selected pages code works great.
However, I'm getting an exception when I call
TPXV_Control.CurrentPage
Is there another way to get the current page of the active document?
And yes, I want to change the Theme programatically.
Thanks.
--Jeff
However, I'm getting an exception when I call
TPXV_Control.CurrentPage
Is there another way to get the current page of the active document?
And yes, I want to change the Theme programatically.
Thanks.
--Jeff
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Selected Pages
Hello Jeff,
What kind of exception are you experiencing with the CurrentPage?
As for the theme, here's the link to the topic:
https://forum.pdf-xchange.com/ ... 66&t=27438
Cheers,
Alex
What kind of exception are you experiencing with the CurrentPage?
As for the theme, here's the link to the topic:
https://forum.pdf-xchange.com/ ... 66&t=27438
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Selected Pages
The kind that crashes my program. Here are some lines from madExcept
005afe7a +07a FileCenter.exe System.Win.ComObj DispatchInvokeError
007a58d5 +061 FileCenter.exe Vcl.OleCtrls TOleControl.GetProperty
007a54bd +005 FileCenter.exe Vcl.OleCtrls TOleControl.GetIntegerProp
0097138c +044 FileCenter.exe PDFXEdit_SDK 5376 +3 TMyPDFControl.CurrentPage
012c5039 +029 FileCenter.exe ViewerTrackerFme 87 +1 TfmeTrackViewer.tbnTestClick
Looks like it is a broader issue. Calling
TPXV_Control.ZoomLevel
crashes as well.
Looks like it may be an issue with the Properties off of the TPXV_Control object.
Also, any way to customize the themes programatically? Looks like I would do something like
FControl.Inst.Settings['CustomUI.Colors'].Add(dt_Array).v := RGB(255, 255, 255);
But I'm not sure how to set the value in Delphi since it is a vt_Array type. The above doesn't seem to work.
--Jeff
005afe7a +07a FileCenter.exe System.Win.ComObj DispatchInvokeError
007a58d5 +061 FileCenter.exe Vcl.OleCtrls TOleControl.GetProperty
007a54bd +005 FileCenter.exe Vcl.OleCtrls TOleControl.GetIntegerProp
0097138c +044 FileCenter.exe PDFXEdit_SDK 5376 +3 TMyPDFControl.CurrentPage
012c5039 +029 FileCenter.exe ViewerTrackerFme 87 +1 TfmeTrackViewer.tbnTestClick
Looks like it is a broader issue. Calling
TPXV_Control.ZoomLevel
crashes as well.
Looks like it may be an issue with the Properties off of the TPXV_Control object.
Also, any way to customize the themes programatically? Looks like I would do something like
FControl.Inst.Settings['CustomUI.Colors'].Add(dt_Array).v := RGB(255, 255, 255);
But I'm not sure how to set the value in Delphi since it is a vt_Array type. The above doesn't seem to work.
--Jeff
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Selected Pages
Hello Jeff,
As for the exceptions - there is a problem with the IPXV_Control interface in the TLB. Some properties are not valid when used in Delphi - we will need to investigate and fix that.
As for the color setting, there is a sample of doing that in the FullDemo application. The problem is that the structure of the CAB node is not a simple number as you've tried to add. Check this code in the FullDemo:
Cheers,
Alex
As for the exceptions - there is a problem with the IPXV_Control interface in the TLB. Some properties are not valid when used in Delphi - we will need to investigate and fix that.
As for the color setting, there is a sample of doing that in the FullDemo application. The problem is that the structure of the CAB node is not a simple number as you've tried to add. Check this code in the FullDemo:
Code: Select all
// setup colors
{
PDFXEdit.ICabNode clrArr = pr["Colors"];
SetCustColor(clrArr, "base", clr2str(btnFaceClr.BackColor));
SetCustColor(clrArr, "window", clr2str(btnWndClr.BackColor));
SetCustColor(clrArr, "text", clr2str(btnTextClr.BackColor));
SetCustColor(clrArr, "selection", clr2str(btnSelClr.BackColor));
}
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Selected Pages
Is there another way to get the CurrentPage?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Selected Pages
Hello Jeff,
Sure, the Control is just the interface used for easier SDK usage. Here's how the get_CurrentPage implemented inside of it:
FControl.Doc.ActiveView.PagesView.Layout.CurrentPage
Cheers,
Alex
Sure, the Control is just the interface used for easier SDK usage. Here's how the get_CurrentPage implemented inside of it:
FControl.Doc.ActiveView.PagesView.Layout.CurrentPage
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ