We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to set the page orientation [PDF]

Thread ID:

Created:

Updated:

Platform:

Replies:

51064 Oct 26,2006 07:16 PM UTC Oct 27,2006 04:17 AM UTC Windows Forms 3
loading
Tags: PDF
Kari Paukku
Asked On October 26, 2006 07:16 PM UTC

Hi,
how does one set the page orination when creating a PDF file using VB.Net?
TIA,
Kari

Ajish [Syncfusion]
Replied On October 26, 2006 07:43 PM UTC

Hi Kari,

Essential PDF supports the Orientation of pages in a document. The PageOrientation property of a PDF document is used to assign the orientation type. LandScape Orientation and Portrait Orientation are supported.

Here is a sample code.

[C#]

// To create Landscape orientation.
pdfDoc.LastPage.Orientation = PageOrientation.Landscape;

// Create second page.
pdfDoc.CreatePage();

// To create Portrait Orientation.
pdfDoc.LastPage.Orientation = PageOrientation.Portrait;



[VB.NET]

' To create Landscape orientation.
pdfDoc.LastPage.Orientation = PageOrientation.Landscape

' Create second page.
pdfDoc.CreatePage()

' To create Portrait Orientation.
pdfDoc.LastPage.Orientation = PageOrientation.Portrait

you can find a sample at the following path demonstrating various page setting that can be made with Essential PDF

C:\Program Files\Syncfusion\Essential Studio\4.3.0.30\Windows\Pdf.Windows\Samples\Grid Model\Settings\PageSettings


Please take a look and let me know if you need any further assistance.

Regards,
Ajish.


>Hi,
how does one set the page orination when creating a PDF file using VB.Net?
TIA,
Kari

Kari Paukku
Replied On October 26, 2006 09:21 PM UTC

Ok, it may be here where my problem is: I would like to use the "Flow Model" (not the grid model).

Does the Flow model also have similar functionality?

Thanks for the help,
kari


Dhivya K [Syncfusion]
Replied On October 27, 2006 04:17 AM UTC

Hi Kari,

We do have option for setting page orientation in Flow model. Here are some code to do this:

[C#]
// Create a section in pdf document
IPDFSection section = document.AddSection();

// Create Landscape orientation.
section.PageSetup.Orientation = PageOrientation.Landscape;

// Create another section in new page
section=document.AddSection();
section.BreakCode = SectionBreakCode.NewPage;

// Create Portrait orientation.
section.PageSetup.Orientation = PageOrientation.Portrait;

[VB.Net]
'Create a section in pdf document
Dim section As IPDFSection = document.AddSection()

'Create Landscape orientation.
section.PageSetup.Orientation = PageOrientation.Landscape

'Create another section in new page
section = document.AddSection()
section.BreakCode = SectionBreakCode.NewPage

'Create Portrait orientation.
section.PageSetup.Orientation = PageOrientation.Portrait

Here is a sample for your reference:
PageOrientation.zip

Please take a look into it and let me know if you have any queries.

Regards,
Dhivya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;