GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / SetViewerNonFullScreenPageMode Method
A member of the PdfViewerNonFullScreenPageMode enumeration. Set this parameter according to your preference.
Example





In This Topic
SetViewerNonFullScreenPageMode Method (GdPicturePDF)
In This Topic
Sets 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 GdPicturePDF.GetViewerPageMode method is PdfViewerPageMode.PdfViewerPageModeFullScreen. It is ignored otherwise.
Syntax
'Declaration
 
Public Function SetViewerNonFullScreenPageMode( _
   ByVal NonFullScreenPageMode As PdfViewerNonFullScreenPageMode _
) As GdPictureStatus
public GdPictureStatus SetViewerNonFullScreenPageMode( 
   PdfViewerNonFullScreenPageMode NonFullScreenPageMode
)
public function SetViewerNonFullScreenPageMode( 
    NonFullScreenPageMode: PdfViewerNonFullScreenPageMode
): GdPictureStatus; 
public function SetViewerNonFullScreenPageMode( 
   NonFullScreenPageMode : PdfViewerNonFullScreenPageMode
) : GdPictureStatus;
public: GdPictureStatus SetViewerNonFullScreenPageMode( 
   PdfViewerNonFullScreenPageMode NonFullScreenPageMode
) 
public:
GdPictureStatus SetViewerNonFullScreenPageMode( 
   PdfViewerNonFullScreenPageMode NonFullScreenPageMode
) 

Parameters

NonFullScreenPageMode
A member of the PdfViewerNonFullScreenPageMode enumeration. Set this parameter according to your preference.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
This method is only allowed for use with non-encrypted documents.
Example
How to set thumbnail images to be visible when exiting the full-screen page mode.
Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
If status = GdPictureStatus.OK Then
    status = gdpicturePDF.SetViewerPageMode(PdfViewerPageMode.PdfViewerPageModeFullScreen)
    If status = GdPictureStatus.OK Then
        status = gdpicturePDF.SetViewerNonFullScreenPageMode(PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseThumbs)
        If status = GdPictureStatus.OK Then
            If gdpicturePDF.SaveToFile("test_SetViewerNonFullScreenPageMode_func.pdf", False) = GdPictureStatus.OK Then
                MessageBox.Show("The page mode has been set successfully.", "Example: SetViewerNonFullScreenPageMode")
            End If
        Else
            MessageBox.Show("The SetViewerNonFullScreenPageMode() method has failed with the status: " + status.ToString(), "Example: SetViewerNonFullScreenPageMode")
        End If
    Else
        MessageBox.Show("The SetViewerPageMode() method has failed with the status: " + status.ToString(), "Example: SetViewerNonFullScreenPageMode")
    End If
Else
    MessageBox.Show("The file can't be loaded.", "Example: SetViewerNonFullScreenPageMode")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
    status = gdpicturePDF.SetViewerPageMode(PdfViewerPageMode.PdfViewerPageModeFullScreen);
    if (status == GdPictureStatus.OK)
    {
        status = gdpicturePDF.SetViewerNonFullScreenPageMode(PdfViewerNonFullScreenPageMode.PdfViewerNonFullScreenPageModeUseThumbs);
        if (status == GdPictureStatus.OK)
        {
            if (gdpicturePDF.SaveToFile("test_SetViewerNonFullScreenPageMode_func.pdf", false) == GdPictureStatus.OK)
                MessageBox.Show("The page mode has been set successfully.", "Example: SetViewerNonFullScreenPageMode");
        }
        else
        {
            MessageBox.Show("The SetViewerNonFullScreenPageMode() method has failed with the status: " + status.ToString(), "Example: SetViewerNonFullScreenPageMode");
        }
    }
    else
    {
        MessageBox.Show("The SetViewerPageMode() method has failed with the status: " + status.ToString(), "Example: SetViewerNonFullScreenPageMode");
    }
}
else
{
    MessageBox.Show("The file can't be loaded.", "Example: SetViewerNonFullScreenPageMode");
}
gdpicturePDF.Dispose();
See Also