Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

PDF::API2 copy page

by shibu_pu (Acolyte)
on Jul 22, 2009 at 09:37 UTC ( [id://782227]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://782227]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found