#!/usr/bin/perl

use PDF::API2;
use PDF::API2::Util;
use PDF::API2::PDF::Utils;

$pdf=PDF::API2->new;

$f1=$pdf->corefont('Helvetica',1);

foreach my $i (glob('*.jpg')) {
	$page = $pdf->page;
	$page->mediabox(595,842);
	$txt=$page->text;

	$txt->translate(100,800);
	$txt->font($f1,30);
	$txt->text("image: $i");

	$gfx=$page->gfx;

	my $img=$pdf->image($i);
	
	$gfx->image($img,0,0);

	$gfx->image($img,200,200,72/150);

	$gfx->image($img,400,400,150,150);
}

$pdf->saveas("$0.pdf");

$pdf->end();

exit;

__END__
