in reply to Re^2: PDF mod suggestions
in thread PDF mod suggestions

Thanks for you comments and fixes .. however I can only see one thing that is changed (other than the addition of CLI code).

You've called pdfimageobj on the old pdf rather than the new one. That's wrong -- you need to call it on the new file, so that the page is loaded into the new pdf. The gfx->pdfimage call later then tells where that page should be placed.

You can tell that by the interface: You code ($img = $oldpdf->pdfimageobj($oldpdf, $pg)) would set @_ in the sub to ($oldpdf, $oldpdf, $pg). That wouldn't be right. There's be no need to declare the $oldpdf as a parameter to the sub as it's the object on which it's being called.

"Get real! This is a discussion group, not a helpdesk. You post something, we discuss its implications. If the discussion happens to answer a question you've asked, that's incidental." -- nobull@mail.com in clpm

Replies are listed 'Best First'.
Re^4: PDF mod suggestions
by dpavlin (Friar) on Jun 25, 2004 at 16:27 UTC
    Thanks, I'm still beginner in PDF::API2 (like so many othters) so that's why I appriciate examples like the one you provided.
    2share!2flame...