Change Page Orientation

Change Page Orientation

Forum member · Jul 11, 2009
How do I change a page to landscape orientation in asp?

Re: Change Page Orientation

Support · Jul 13, 2009
Hello, In order to create a page in landscape mode you will have to swap the width and height of the page. You can refer to the Coordinate System topic on our help documentation. Thanks, ceTe Software Support Team

Re: Change Page Orientation

Forum member · Jul 13, 2009
Thank you very much. That worked perfect.

Re: Change Page Orientation

Forum member · Aug 20, 2020
I can't seem to figure this out. I want to change a page to landscape, When I use SetMargins , nothing changes. Can you give me an example in classic ASP for changing a page to landscape? Thank you. --Jim

Re: Change Page Orientation

Support · Aug 20, 2020
Hello Jim, You can set the width and height to the Page object using PageWidth and PageHeight properties. Below is a code sample: <!-- METADATA TYPE="typelib" UUID="{DF9225FE-94A4-490D-8CAD-E8366CE621D3}"--> <% 'The METADATA tag above was added to import the constants (i.e. DPDF_Font_Helvetica). Option Explicit Dim MyDocument, MyPage Dim MyStrText ' Create Document object and set properties Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) ' Add a page to the document Set MyPage = MyDocument.AddPage() MyPage.PageWidth=11*72 MyPage.PageHeight=8.5*72 ' Add a textarea to the page MyStrText = "Hello ASP World..." & vbCrLf & "From DynamicPDF Generator for COM/ActiveX" & vbCrLf & "DynamicPDF.com" Dim MyLabel Set MyLabel = MyPage.AddLabel(MyStrText, 0, 0, 504, 54) ' Output the Document to the Browser MyDocument.DrawToWeb ' Object cleanup Set MyPage = Nothing Set MyDocument = Nothing %> Thanks, ceTe Software Support Team