Hi,
One of the Page object's constructors takes a PageSize enum. This enum lists a number of common paper sizes. However, we are printing to a label that is 4" x 6.5". All of the pre-defined page sizes are either a little too small or too big. Can a specify specific dimensions for my page?
Thanks.
Setting PageSize
Re: Setting PageSize
Forum member · Nov 9, 2005BTW, the message board was throwing errors when I posted this message. I assumed the message was not being posted. I was wrong.
Re: Setting PageSize
Support · Nov 10, 2005Hello,
Yes, you can specify the dimensions of the page to any desired width and height. There is a page constructor which takes PageDimenions object.
DynamicPDF™ Generator for .NET uses a coordinate system based on points. There are 72 points in an inch. Therefore to specify the page with dimensions equal to 4" by 6.5" set the width to 288 and the height to 468.
Here is the code snippet:
C#:
PageDimensions dimension = new PageDimensions( 288, 468 );
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( dimension );
VB.NET:
Dim MyDimension As PageDimensions = New PageDimensions( 288, 468 )
' Create a page to add to the document
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page( MyDimension )
Thanks,
ceTe Software Support Team