GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / GetViewerNonFullScreenPageMode Method
Example





In This Topic
GetViewerNonFullScreenPageMode Method (GdPicturePDF)
In This Topic
Returns the document's page mode setting, specifying how to display the document on exiting full-screen mode when viewing the document in Adobe Reader or Acrobat viewer. This setting is only meaningful if the value returned by the GetViewerPageMode method is PdfViewerPageMode.PdfViewerPageModeFullScreen. It is ignored otherwise.
Syntax
'Declaration
 
Public Function GetViewerNonFullScreenPageMode() As PdfViewerNonFullScreenPageMode
public PdfViewerNonFullScreenPageMode GetViewerNonFullScreenPageMode()
public function GetViewerNonFullScreenPageMode(): PdfViewerNonFullScreenPageMode; 
public function GetViewerNonFullScreenPageMode() : PdfViewerNonFullScreenPageMode;
public: PdfViewerNonFullScreenPageMode GetViewerNonFullScreenPageMode(); 
public:
PdfViewerNonFullScreenPageMode GetViewerNonFullScreenPageMode(); 

Return Value

A member of the PdfViewerNonFullScreenPageMode enumeration. The default value is PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseNone.

The GetStat method can be subsequently used to determine if this method has been successful.

Remarks
This method is only allowed for use with non-encrypted documents.

It is recommend to use the GetStat method to identify the specific reason for the method's failure, if any.

Example
How to find out the way your document will display on exiting full-screen mode.
Dim caption As String = "Example: GetViewerNonFullScreenPageMode"
Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
If status = GdPictureStatus.OK Then
   Dim oNonFullScreenPageMode As PdfViewerNonFullScreenPageMode = gdpicturePDF.GetViewerNonFullScreenPageMode()
   status = gdpicturePDF.GetStat()
   if status= GdPictureStatus.OK Then
        Select Case oNonFullScreenPageMode
        Case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseNone
        MessageBox.Show("Neither document outline nor thumbnail images are visible.", caption)
        Case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseOutlines
        MessageBox.Show("Document outline is visible.", caption)
        Case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseThumbs
        MessageBox.Show("Thumbnail images are visible.", caption)
        Case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseOC
        MessageBox.Show("Optional content group panel is visible.", caption)
        Case Else
        MessageBox.Show("An invalid value has been returned.", caption)
        End Select
    Else
        MessageBox.Show("The GetViewerNonFullScreenPageMode() method has failed with the status: " + status.ToString(), caption)
    End If
Else
   MessageBox.Show("The file can't be loaded.", caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: GetViewerNonFullScreenPageMode";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
    PdfViewerNonFullScreenPageMode oNonFullScreenPageMode = gdpicturePDF.GetViewerNonFullScreenPageMode();
    status = gdpicturePDF.GetStat();
    if (status == GdPictureStatus.OK)
    {
        switch (oNonFullScreenPageMode)
        {
            case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseNone:
                MessageBox.Show("Neither document outline nor thumbnail images are visible.", caption);
                break;
            case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseOutlines:
                MessageBox.Show("Document outline is visible.", caption);
                break;
            case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseThumbs:
                MessageBox.Show("Thumbnail images are visible.", caption);
                break;
            case PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseOC:
                MessageBox.Show("Optional content group panel is visible.", caption);
                break;
            default:
                MessageBox.Show("An invalid value has been returned.", caption);
                break;
        }
    }
    else
    {
        MessageBox.Show("The GetViewerNonFullScreenPageMode() method has failed with the status: " + status.ToString(), caption);
    }
}
else
{
    MessageBox.Show("The file can't be loaded.", caption);
}
gdpicturePDF.Dispose();
See Also