We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF Cropping

Currently we are using your 30 day trial license for Aspose.PDF. We are trying to take a PDF and split each page in the PDF into a seperate pdf file. This is working fine regardless of file size. After splitting we crop each image to show the bottom left hand corner.

Here is the code I use to do it:

Dim DocWidth As Double = doc.Pages(1).ArtBox.Width
Dim DocHeight As Double = doc.Pages(1).ArtBox.Height

Dim LLX As Double = DocWidth - CropWidth
Dim LLY As Double = DocHeight

Dim URX As Double = DocWidth
Dim URY As Double = DocHeight - CropHeight

'build crop area
Dim crop As New Aspose.Pdf.Rectangle(LLX, LLY, URX, URY)

'crop image
doc.Pages(1).CropBox = crop

Sometimes this shows the entire file instead of the crop, but the wierd thing is other files from the same original PDF show the crop fine. Any direction on this would be appreciated as the cropping feature of your PDF package is the main reason we are looking at your tool.


Hi Samir,

Thanks for your inquiry. We will appreciate it if you please share your problematic PDF document here, we will look into it and guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,