GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / RemovePageBox Method
The required page (boundary) box. A member of the PdfPageBox enumeration.
Example





In This Topic
RemovePageBox Method (GdPicturePDF)
In This Topic
Removes the specified page box of the currently selected page of the loaded PDF document.
Syntax
'Declaration
 
Public Function RemovePageBox( _
   ByVal PageBox As PdfPageBox _
) As GdPictureStatus
public GdPictureStatus RemovePageBox( 
   PdfPageBox PageBox
)
public function RemovePageBox( 
    PageBox: PdfPageBox
): GdPictureStatus; 
public function RemovePageBox( 
   PageBox : PdfPageBox
) : GdPictureStatus;
public: GdPictureStatus RemovePageBox( 
   PdfPageBox PageBox
) 
public:
GdPictureStatus RemovePageBox( 
   PdfPageBox PageBox
) 

Parameters

PageBox
The required page (boundary) box. A member of the PdfPageBox enumeration.

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.

Since MediaBox is a mandatory entry for each page object it is not possible to remove this type of page box using this method.

Example
How to remove the cropbox boundaries of the page in your document.
Using gdpicturePDF As New GdPicturePDF
    gdpicturePDF.LoadFromFile("input.pdf")
    gdpicturePDF.SelectPage(1)
    gdpicturePDF.RemovePageBox(PdfPageBox.PdfPageBoxCropBox)
    gdpicturePDF.SaveToFile("output.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
    gdpicturePDF.LoadFromFile("input.pdf");
    gdpicturePDF.SelectPage(1);
    gdpicturePDF.RemovePageBox(PdfPageBox.PdfPageBoxCropBox);
    gdpicturePDF.SaveToFile("output.pdf");
}
See Also