Resize Page
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.
Resize Page
Is there a way that I can achieve the "Resize Pages" functionality via code, but pass a paper size and orientation e.g. 297 x 420 Landscape?
Basically to achieve the same thing that the "Resize Pages" form does, as shown below:
Thanks
Simon
Basically to achieve the same thing that the "Resize Pages" form does, as shown below:
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Resize Page
Hello Simon,
Of course. You will have to use this operation and modify it's Options to your liking:
https://sdkhelp.pdf-xchange.com/vi ... esizePages
Cheers,
Alex
Of course. You will have to use this operation and modify it's Options to your liking:
https://sdkhelp.pdf-xchange.com/vi ... esizePages
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Resize Page
Thanks Alex,
I am using the below code to resize my page. However I have found something a bit strange. If I use a standard page size e.g. A3 which is StdPaperIndex 3 it all works fine. However if I specify a custom paper size e.g. W = 419.9 H = 269.9 the code works but sets the paper size to W = 148.1 H = 95.2 which is a bit strange, am I doing something wrong?
Thanks
Simon
I am using the below code to resize my page. However I have found something a bit strange. If I use a standard page size e.g. A3 which is StdPaperIndex 3 it all works fine. However if I specify a custom paper size e.g. W = 419.9 H = 269.9 the code works but sets the paper size to W = 148.1 H = 95.2 which is a bit strange, am I doing something wrong?
Code: Select all
nID = Inst.Str2ID("op.document.resizePages", False)
Op = Inst.CreateOp(nID)
input = Op.Params.Root("Input")
input.v = Me.docPreview.Doc.CoreDoc
options = Op.Params.Root("Options")
options("PaperType").v = 2
options("Width").v = 419.9
options("Height").v = 269.9
'options("PaperType").v = 1
'options("StdPaperIndex").v = 3
'options("Landscape").v = True
Op.Do()
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Resize Page
Hello Simon,
To use Custom values, you will have to specify Custom PaperType value.
Cheers,
Alex
To use Custom values, you will have to specify Custom PaperType value.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Resize Page
Alex,
I am specifying the PaperType value to 2 which is custom, see code in original post. Please note the standard PaperType code is commented out.
Thanks
Simon
I am specifying the PaperType value to 2 which is custom, see code in original post. Please note the standard PaperType code is commented out.
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Resize Page
Hello Simon,
Well, if you look carefully, the input parameters are in points, and I suspect that the current unit in your application is millimeters.
Cheers,
Alex
Well, if you look carefully, the input parameters are in points, and I suspect that the current unit in your application is millimeters.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Resize Page
Alex,
You are absolutely correct, sorry my error. However now another question, is there a way to get the page size in points, or a way to convert a page size from mm to points?
Thanks
Simon
You are absolutely correct, sorry my error. However now another question, is there a way to get the page size in points, or a way to convert a page size from mm to points?
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Resize Page
Hello Simon,
If you get page size from the IPXC_Page's rectangle - it's always in points.
Cheers,
Alex
If you get page size from the IPXC_Page's rectangle - it's always in points.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Resize Page
Thanks Alex, and also googled and you can multiply points by 2.835 to get to millimetres.
Thanks
Simon
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Resize Page
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ