artist has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a PDF file with PDF::API2 and use PDF::API2::Gfx to have an image in PDF file. I like to center the image instead of specifiying the X co-ordinate. I like to allow a certain Y co-ordinate.
#!/usr/bin/perl use strict; use warnings; use PDF::API2; my $imageFile = 'test.jpg'; my $doc = new PDF::API2( -file => "$0.pdf" ); my $page = $doc->page(); my $gfx = $page->gfx(); my $pic = $doc->image_jpeg( $imageFile ); $gfx->image( $pic, 100, 100, 1 ); $doc->save();
Thanks..
--Artist

Replies are listed 'Best First'.
Re: Centering image in PDF
by artist (Parson) on Apr 06, 2005 at 23:51 UTC
    Sorry, but I cannot find anything useful for this purpose over there.
    --Artist
Re: Centering image in PDF
by ghenry (Vicar) on Apr 06, 2005 at 23:05 UTC
Re: Centering image in PDF
by jj808 (Hermit) on Apr 07, 2005 at 21:26 UTC