Hi perlers,
This is a rather specialised query about the module PDF::API2.
I am trying to create PDFs on the fly. The first attempt worked fine
and I was delighted with the results. Then I was asked to make
something similar with landscape orientation. It started well but I
have hit a problem and I can't see what is going wrong.
To make the page landscape I have used the 'rotate' method. Similarly
I used the rotate method on the graphics handle, otherwise the images
appears in portrait while the page is in landscape. It is this rotate
that is causing the problem.
Normally I maintain the spacing of the images by incrementing the Y
axis value ($y) by the width of the last image, for test purposes I
am simply incrementing $y by 162 pixels. Once the graphics is rotated
all hell breaks loose with the lay-out and I can not see where the
image is laid on the page. I have tried a number of values (fixed and
incrementing) yet I can not see how I can rotate the image and
maintain control over $y.
I have attached a skeleton of script I am working on. The image file
can be anything. If it is run unmodified you should see 4 jpegs along
the top and 4 along the bottom, unrotated. Once line 99 is
uncommented:
# $photo->rotate($rotation);
the images start to disappear, presumably off the page.
$x is pretty constant either 18 or 270.
I know this is a bit specialised but if anyone has any ideas they'd
be much appreciated. Thanx.
Dermot.