|
Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
How can I set it to auto-detect orientation when printing PDF?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
No. This is not supported. You can check the PDF page size and decide what orientation you wish the print to be.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
Do you have some example of this? I mean what to check and how?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
You just check the page size.
Code: C#
if (doc.Pages[0].Width > doc.Pages[0].Height)
//do something when the page's width is greater than the page's height
You need to be aware that different page can have different sizes in the same PDF file though.
|
|
Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
You mean doc.Pages(0).Size.Width?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
serializer wrote:You mean doc.Pages(0).Size.Width? Yes. You are correct. Sorry about the mistake.
|
|