PDFsharp & MigraDoc Foundation

Adding Outline on landscape orientated Page changes orientat
Page 1 of 1

Author:  Juerka [ 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.

    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)

    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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group