#!/usr/bin/perl

use PDF::API2;

$pdf2=PDF::API2->open($ARGV[0]||'06_images-pl.pdf');

$pdf=PDF::API2->new;

$pdf->importpage($pdf2,1);

$img=$pdf->pdfimage($ARGV[0]||'06_images-pl.pdf',1);

$page = $pdf->page;
$page->mediabox(595,842);

$gfx=$page->gfx;
$gfx->pdfimage($img,100,100,0.3);

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


$pdf2=PDF::API2->open($ARGV[0]||'06_images-pl.pdf');

$pdf=PDF::API2->new;

$pdf->importpage($pdf2,1);

$img=$pdf->pdfimageobj($pdf2,1);

$page = $pdf->page;
$page->mediabox(595,842);

$gfx=$page->gfx;
$gfx->pdfimage($img,100,100,0.3);

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

$pdf->end();
$pdf2->end();

exit;

__END__
