PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Jul 17, 2019 11:23 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Nov 17, 2016 2:59 pm 
Offline

Joined: Thu Nov 17, 2016 2:54 pm
Posts: 1
how do I format a document in the landscape format using PDFsharp methods.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 17, 2016 4:21 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2952
Location: Cologne, Germany
Hi!

What do you want?

Create a page, set the "Orientation" of that page to "Landscape", and that should be all.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed May 15, 2019 1:45 pm 
Offline

Joined: Fri May 03, 2019 10:10 pm
Posts: 18
The above answer was not very informative.
What is the syntax?
I have tried this, but it does not work:
Code:
Enum pageOrientation
        Landscape
        Portrait
    End Enum
Dim ort As pageOrientation = pageOrientation.Landscape

No errors but is still portrait!
Please enlighten me?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 15, 2019 2:17 pm 
Offline

Joined: Fri May 03, 2019 10:10 pm
Posts: 18
The topic in the example code was not very informative.
What is the syntax?
I have tried this, but it does not work:
Code:
Enum pageOrientation
        Landscape
        Portrait
    End Enum
Dim ort As pageOrientation = pageOrientation.Landscape

No errors but is still portrait!
And for page size:
Code:
Enum Pagesize
        A4
        A5
    End Enum
Dim size As Pagesize = Pagesize.A5

Still A4?
Please enlighten me?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 15, 2019 2:27 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2952
Location: Cologne, Germany
Rocky48 wrote:
I have tried this, but it does not work
I see just an isolated code snippet.

Use the enum that comes with PDFsharp, do not create an enum of your own.
Set the Orientation property of the page, do not create a variable of your own.

Also see this C# sample:
http://www.pdfsharp.net/wiki/PageSizes-sample.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group