WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PageScalingMode - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Enum PageScalingMode

    Specifies the different page scaling option that shall be selected when a print dialog is displayed for this document.

    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PageScalingMode
    Remarks

    Default value is AppDefault.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Set AppDefault mode as page`s scaling mode.
    document.ViewerPreferences.PageScaling = PageScalingMode.AppDefault;
    //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 documen to disk.
    document.Save("ScalingMode.pdf");
    //Close the document.
    document.Close(true);
    'Create a new PDF document.
    Dim document As PdfDocument = New PdfDocument()
    'Set AppDefault mode as page`s scaling mode.
    document.ViewerPreferences.PageScaling = PageScalingMode.AppDefault
    '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, 12f, PdfFontStyle.Bold)
    'Draw the text in PDF page.
    page.Graphics.DrawString("Essential PDF", font, PdfBrushes.Black, New PointF(10, 10))
    'Save document to disk.
    document.Save("ScalingMode.pdf")
    'Close the document.
    document.Close(True)

    Fields

    Name Description
    AppDefault

    Indicates the conforming reader�s default print scaling.

    None

    Indicates no page scaling.

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