PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Adding Outline on landscape orientated Page changes orientat
https://forum.pdfsharp.net/viewtopic.php?f=3&t=217
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.

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/