File Formats

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfPageMode

    Show / Hide Table of Contents

    Enum PdfPageMode

    Represents mode of document displaying.

    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfPageMode
    Examples
    //Create a new document.
    PdfDocument document = new PdfDocument();
    //Set page mode.
    document.ViewerPreferences.PageMode = PdfPageMode.UseOC;
    //Add a page in the PDF document.
    PdfPage page = document.Pages.Add();
    //Create the PDF font instance.
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
    //Draw the text in PDF page.
    page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, new PointF(10, 10));
    //Save the document.
    document.Save("Output.pdf");
    //Close the documents.
    document.Close(true);
    'Create a new document.
    Dim document As PdfDocument = New PdfDocument()
    'Set page mode.
    document.ViewerPreferences.PageMode = PdfPageMode.UseOC
    'Add a page in the PDF document.
    Dim page As PdfPage = document.Pages.Add()
    'Create the PDF font instance.
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12.0F, PdfFontStyle.Bold)
    'Draw the text in PDF page.
    page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
    'Save the document.
    document.Save("Output.pdf")
    'Close the documents.
    document.Close(True)

    Fields

    Name Description
    FullScreen

    Full-screen mode, with no menu bar, window controls, or any other window visible.

    UseAttachments

    Attachments are visible.

    UseNone

    Default value. Neither document outline nor thumbnail images visible.

    UseOC

    Optional content group panel visible.

    UseOutlines

    Document outline visible.

    UseThumbs

    Thumbnail images visible.

    See Also
    PdfDocument
    PdfPage
    PdfViewerPreferences
    PdfFont
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved