SetPageLabelsRangeStartPage Method (GdPicturePDF)
                In This Topic
            
            Modifies the starting page of the labeling range, specified by its index, of the currently loaded PDF document.
            
            
            Syntax
            
            
            
            
            'Declaration
 
Public Function SetPageLabelsRangeStartPage( _
   ByVal  As Integer, _
   ByVal  As Integer _
) As GdPictureStatus
             
        
            
            public GdPictureStatus SetPageLabelsRangeStartPage( 
   int ,
   int 
)
             
        
            
            public function SetPageLabelsRangeStartPage( 
    : Integer;
    : Integer
): GdPictureStatus; 
             
        
            
            public function SetPageLabelsRangeStartPage( 
    : int,
    : int
) : GdPictureStatus;
             
        
            
            public: GdPictureStatus SetPageLabelsRangeStartPage( 
   int ,
   int 
) 
             
        
            
            public:
GdPictureStatus SetPageLabelsRangeStartPage( 
   int ,
   int 
) 
             
        
             
        
            Parameters
- LabelingRangeIdx
- The index of the required labeling range. It must be a value from 0 to GdPicturePDF.GetPageLabelsRangeCount-1.
- StartPage
- Defined the new starting page of the required labeling range. It must be a value from 1 to GdPicturePDF.GetPageCount.
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.
 
            
            
            
            
            
            Example
How to change the starting page of the specified page labeling range.
            
            
            
             
    
	
		Dim caption As String = "Example: SetPageLabelsRangeStartPage"
Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
    Dim rangesCount As Integer = gdpicturePDF.GetPageLabelsRangeCount()
    Dim status As GdPictureStatus = gdpicturePDF.GetStat()
    If status = GdPictureStatus.OK Then
        If rangesCount > 0 Then
            Dim pageCount As Integer = gdpicturePDF.GetPageCount()
            status = gdpicturePDF.GetStat()
            If status = GdPictureStatus.OK Then
                status = gdpicturePDF.SetPageLabelsRangeStartPage(0, pageCount)
                If status = GdPictureStatus.OK Then
                    If gdpicturePDF.SaveToFile("test_SetPageLabelsRangeStartPage.pdf") = GdPictureStatus.OK Then
                        MessageBox.Show("The starting page for the first labeling range has been reset successfully and the file has been saved.", caption)
                    Else
                        MessageBox.Show("The starting page for the first labeling range has been reset successfully, but the file can't be saved.", caption)
                    End If
                Else
                    MessageBox.Show("The SetPageLabelsRangeStartPage() method has failed with the status: " + status.ToString(), caption)
                End If
            Else
                MessageBox.Show("The GetPageCount() method has failed with the status: " + status.ToString(), caption)
            End If
        Else
            MessageBox.Show("No page labeling ranges are defined in this PDF document.", caption)
        End If
    Else
        MessageBox.Show("The GetPageLabelsRangeCount() 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: SetPageLabelsRangeStartPage";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
    int rangesCount = gdpicturePDF.GetPageLabelsRangeCount();
    GdPictureStatus status = gdpicturePDF.GetStat();
    if (status == GdPictureStatus.OK)
    {
        if (rangesCount > 0)
        {
            int pageCount = gdpicturePDF.GetPageCount();
            status = gdpicturePDF.GetStat();
            if (status == GdPictureStatus.OK)
            {
                status = gdpicturePDF.SetPageLabelsRangeStartPage(0, pageCount);
                if (status == GdPictureStatus.OK)
                {
                    if (gdpicturePDF.SaveToFile("test_SetPageLabelsRangeStartPage.pdf") == GdPictureStatus.OK)
                        MessageBox.Show("The starting page for the first labeling range has been reset successfully and the file has been saved.", caption);
                    else
                        MessageBox.Show("The starting page for the first labeling range has been reset successfully, but the file can't be saved.", caption);
                }
                else
                    MessageBox.Show("The SetPageLabelsRangeStartPage() method has failed with the status: " + status.ToString(), caption);
            }
            else
                MessageBox.Show("The GetPageCount() method has failed with the status: " + status.ToString(), caption);
        }
        else
            MessageBox.Show("No page labeling ranges are defined in this PDF document.", caption);
    }
    else
        MessageBox.Show("The GetPageLabelsRangeCount() method has failed with the status: " + status.ToString(), caption);
}
else
    MessageBox.Show("The file can't be loaded.", caption);
gdpicturePDF.Dispose();
	 
	
 
Example
How to change the starting page of the specified page labeling range.
            
            Dim caption As String = "Example: SetPageLabelsRangeStartPage"
            Dim gdpicturePDF As New GdPicturePDF()
            If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
                Dim rangesCount As Integer = gdpicturePDF.GetPageLabelsRangeCount()
                Dim status As GdPictureStatus = gdpicturePDF.GetStat()
                If status = GdPictureStatus.OK Then
                    If rangesCount > 0 Then
                        Dim pageCount As Integer = gdpicturePDF.GetPageCount()
                        status = gdpicturePDF.GetStat()
                        If status = GdPictureStatus.OK Then
                            status = gdpicturePDF.SetPageLabelsRangeStartPage(0, pageCount)
                            If status = GdPictureStatus.OK Then
                                If gdpicturePDF.SaveToFile("test_SetPageLabelsRangeStartPage.pdf") = GdPictureStatus.OK Then
                                    MessageBox.Show("The starting page for the first labeling range has been reset successfully and the file has been saved.", caption)
                                Else
                                    MessageBox.Show("The starting page for the first labeling range has been reset successfully, but the file can't be saved.", caption)
                                End If
                            Else
                                MessageBox.Show("The SetPageLabelsRangeStartPage() method has failed with the status: " + status.ToString(), caption)
                            End If
                        Else
                            MessageBox.Show("The GetPageCount() method has failed with the status: " + status.ToString(), caption)
                        End If
                    Else
                        MessageBox.Show("No page labeling ranges are defined in this PDF document.", caption)
                    End If
                Else
                    MessageBox.Show("The GetPageLabelsRangeCount() 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: SetPageLabelsRangeStartPage";
            GdPicturePDF gdpicturePDF = new GdPicturePDF();
            if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
            {
                int rangesCount = gdpicturePDF.GetPageLabelsRangeCount();
                GdPictureStatus status = gdpicturePDF.GetStat();
                if (status == GdPictureStatus.OK)
                {
                    if (rangesCount > 0)
                    {
                        int pageCount = gdpicturePDF.GetPageCount();
                        status = gdpicturePDF.GetStat();
                        if (status == GdPictureStatus.OK)
                        {
                            status = gdpicturePDF.SetPageLabelsRangeStartPage(0, pageCount);
                            if (status == GdPictureStatus.OK)
                            {
                                if (gdpicturePDF.SaveToFile("test_SetPageLabelsRangeStartPage.pdf") == GdPictureStatus.OK)
                                    MessageBox.Show("The starting page for the first labeling range has been reset successfully and the file has been saved.", caption);
                                else
                                    MessageBox.Show("The starting page for the first labeling range has been reset successfully, but the file can't be saved.", caption);
                            }
                            else
                                MessageBox.Show("The SetPageLabelsRangeStartPage() method has failed with the status: " + status.ToString(), caption);
                        }
                        else
                            MessageBox.Show("The GetPageCount() method has failed with the status: " + status.ToString(), caption);
                    }
                    else
                        MessageBox.Show("No page labeling ranges are defined in this PDF document.", caption);
                }
                else
                    MessageBox.Show("The GetPageLabelsRangeCount() method has failed with the status: " + status.ToString(), caption);
            }
            else
                MessageBox.Show("The file can't be loaded.", caption);
            gdpicturePDF.Dispose();
            
            
            
            See Also