Enum PageScalingMode
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies the different page scaling option that shall be selected when a print dialog is displayed for this document.
public enum PageScalingMode
Fields
AppDefault = 0
Indicates the conforming reader�s default print scaling.
None = 1
Indicates no page scaling.
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)
Remarks
Default value is AppDefault.