Table of Contents

Enum PdfPageMode

Namespace
Syncfusion.Pdf
Assembly
Syncfusion.Pdf.Portable.dll

Represents mode of document displaying.

public enum PdfPageMode

Fields

FullScreen = 3

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

UseAttachments = 5

Attachments are visible.

UseNone = 0

Default value. Neither document outline nor thumbnail images visible.

UseOC = 4

Optional content group panel visible.

UseOutlines = 1

Document outline visible.

UseThumbs = 2

Thumbnail images visible.

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)

See Also