Juerka
Joined: 03 Aug 2007 Posts: 2 Location: Regensburg, Bavaria, Germany
|
Posted: Tue Aug 28, 2007 9:31 am Post subject: Adding Outline on landscape orientated Page changes orientat |
|
|
Adding two Outlines to pages with landscape orientation changes the orientatiuon of the used page to portrait.
Code: | Private Sub example()
Dim pdfDoc As PdfSharp.Pdf.PdfDocument
pdfDoc = PdfSharp.Pdf.IO.PdfReader.Open("c:\Mixed Landscape Portrait.pdf")
Dim pdfPage As PdfSharp.Pdf.PdfPage
pdfPage = pdfDoc.Pages.Item(0)
pdfDoc.Outlines.Add("Bookmark on Page 1", pdfPage)
pdfPage = pdfDoc.Pages.Item(1)
pdfDoc.Outlines.Add("Bookmark on Page 2", pdfPage)
pdfDoc.Save(Me.sWorkFile)
End Sub |
The file "Mixed Landscape Portrait.pdf" contains two pages, one landscape and one portrait.
After running the example code both pages are portrait. _________________ Juergen |
|