Class PdfPageMode
Represents mode of document displaying.
Inheritance
System.Object
PdfPageMode
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public sealed class PdfPageMode : Enum
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
FullScreen
Full-screen mode, with no menu bar, window controls, or any other window visible.
Declaration
public const PdfPageMode FullScreen
Field Value
Type |
---|
PdfPageMode |
UseAttachments
Attachments are visible.
Declaration
public const PdfPageMode UseAttachments
Field Value
Type |
---|
PdfPageMode |
UseNone
Default value. Neither document outline nor thumbnail images visible.
Declaration
public const PdfPageMode UseNone
Field Value
Type |
---|
PdfPageMode |
UseOC
Optional content group panel visible.
Declaration
public const PdfPageMode UseOC
Field Value
Type |
---|
PdfPageMode |
UseOutlines
Document outline visible.
Declaration
public const PdfPageMode UseOutlines
Field Value
Type |
---|
PdfPageMode |
UseThumbs
Thumbnail images visible.
Declaration
public const PdfPageMode UseThumbs
Field Value
Type |
---|
PdfPageMode |