How To Set PDF Options For Displaying In PDF Viewer Application

This sample shows how to instruct a PDF viewer to display the document in certain mode.
PDFDocument.PageMode property specifies which additional panels should be shown in a PDF viewer application.

There are the follwoing options:

  1. None - neither document outline nor thumbnail images visible.
  2. Outlines - document outline visible.
  3. Thumbnail - thumbnail images visible.
  4. FullScreen - full-screen mode, with no menu bar, window controls, or any other window visible.
  5. OptionalContent - optional content group panel visible.
  6. Attachment - attachments panel visible.

 

using PDFMosaic;
using System;

namespace PageMode
{
    class PageMode
    {
        static void Main()
        {
            PDFDocument document = new PDFDocument();
            document.Pages.Add(new PDFPage(PDFPaperFormat.A4));

            document.PageMode = PDFPageMode.FullScreen;

            document.Save("PageMode.pdf", true);
        }
    }
}