Welcome Guest Search | Active Topics | Sign In | Register

Changing PDF page margin defaults... Options
Darrel
Posted: Wednesday, September 21, 2011 1:08:25 PM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2011
Posts: 32
How do I change the margins, to say, 0.75" left and right, as default when printing aspx to PDF?

eo_support
Posted: Wednesday, September 21, 2011 1:11:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You would set this property:

http://doc.essentialobjects.com/library/4/eo.pdf.htmltopdfoptions.outputarea.aspx

It would be something like this:

HtmlToPdf.Options.OutputArea = new RectangleF(0.75f, 0.75f, 7f, 9.5f);

Thanks
Darrel
Posted: Wednesday, September 21, 2011 1:29:28 PM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2011
Posts: 32
Wow - that was easy! Thanks...

Is there also a quick way to:
1) Add Headers & Footers
2) Add Page numbers at bottom right
3) Cause a NEW PAGE (to be placed in underlying html)

If not quick, just point me in the right direction...
Thanks much!
eo_support
Posted: Wednesday, September 21, 2011 1:37:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can do all those. I would recommend to take a look of the "Using Html to PDF" section in the help file to get a brief idea of what features are there and how they are organized. The sample application also has a lot of samples demonstrating various features. Those should help you greatly while using our product.

Thanks!
Darrel
Posted: Wednesday, September 21, 2011 1:40:04 PM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2011
Posts: 32
Thank you!


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.