Welcome Guest Search | Active Topics | Sign In | Register

Auto-detect orientation when printing PDF Options
serializer
Posted: Thursday, February 1, 2018 9:03:04 AM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
How can I set it to auto-detect orientation when printing PDF?
eo_support
Posted: Thursday, February 1, 2018 9:44:42 AM
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!
serializer
Posted: Thursday, February 1, 2018 9:45:52 AM
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?
eo_support
Posted: Thursday, February 1, 2018 9:48:44 AM
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.
serializer
Posted: Thursday, February 1, 2018 11:32:06 AM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
You mean doc.Pages(0).Size.Width?
eo_support
Posted: Thursday, February 1, 2018 12:41:14 PM
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.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.