Crop PDF Page

The Crop Box in PDF terms describes the area of the PDF pages displayed by the PDF Reader or printed by the printer.


Setting a crop box with Aloaha is very easy. Please see the sample code below:

dim pdf
set pdf = createobject("aloahapdf.edit")

if pdf.load_pdf_to_mem(cstr(file_to_load)) = true then

     call pdf.set_CropBox(clng(CropPage), clng(cLeft), clng(cTop), clng(cWidth), clng(cHeight)) 
     
     call pdf.save_pdf_to_file(cstr(TargetFile))

end if

set pdf = nothing


Please ask...

Although we really tried hard, there are always questions left open. But perhaps somebody else had already put the same question?
Please check!
  • Does Crop function really delete the contents outside the crop box or just masks it? If it just masks, how do i delete the unwanted portion to reduce my file size?
    The crop function does only mask the area as defined in the PDF specication. There is no way of delete the unwanted portion.
    Answered 11.11.2009
If not, please do not hesitate to send us your question.
We would be glad to answer it.


Home / Knowledge Base / PDF SDK / Crop PDF Page
create PDF Software

Crop PDF Page

Any questions?
Aloaha Software - Knowledge Base / PDF SDK / Crop PDF Page / Set Crop Box
ProductsKnowledge BaseShopSupportPress
Deutsche VersionEnglish version