views:

51

answers:

1

Hi guys. I am creating a pdf from a list of image files and I was wondering if it was possible to create each page of my pdf to be the size of whatever image I am currently adding - so they all fit and none of the larger ones get cropped or whatever.

Currently I'm creating pages like this: my $page = $pdf->page();

I have an object of the specific image as well. And if someone could tag this as PDF::API2 that'd be great.

+2  A: 

I think you want to look at $pdf->mediabox(), $pdf->cropbox(), $pdf->bleedbox(), and $pdf->trimbox().

You probably want to find the PDF spec to determine how these work, though.

Ricky Morse