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

Hi

I am creating a pdf file using PDF::API2. I created a page, put a background image and put some texts on it. What I need is, I want an exact copy of the first page on next page but scaled to 0.5 size of the first page.

I tried to create an xo object of the first page and use formimage to put that xo object on the next page. But failed.

Any Idea?
Thank you.

Replies are listed 'Best First'.
Re: PDF::API2 copy page
by Anonymous Monk on Jul 22, 2009 at 13:34 UTC
    my $copy = $page->copy; $copy->scale(0.5, 0.5 ); $pdf->add_page($copy);
      When I used the above piece of code, my system was hung for a while and the execution of the script was killed automatically.
        I get
        Can't call method "copy" on an undefined value at - line 1.
        Maybe you want to post a complete code sample