Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: PDF API2 - landscape and rotating text and image

by Anonymous Monk
on Jul 25, 2020 at 01:25 UTC ( [id://11119784]=note: print w/replies, xml ) Need Help??


in reply to Re: PDF API2 - landscape and rotating text and image
in thread PDF API2 - landscape and rotating text and image

Hi Ken,

Thank you so much for your explanation and great working code! Wouldn't have thought of a For loop to do the left and right tasks.

I have one question for the line below:

$gfx->image($cfg->{img}, 0, 0);

The values of 0,0 - that outputs the image in its original size (am I right?). I tried with values like 200, 200 to get bigger images but the images don't appear. How do I output the images to bigger sizes?

Thanks you for your great help once again :))

  • Comment on Re^2: PDF API2 - landscape and rotating text and image

Replies are listed 'Best First'.
Re^3: PDF API2 - landscape and rotating text and image
by kcott (Archbishop) on Jul 25, 2020 at 06:44 UTC

    You should look in PDF::API2::Content for information on image(), transform(), and related methods. In particular, look at the "External Objects" and "Coordinate Transformations" sections.

    The '0, 0' to which you referred are co-ordinates, not sizes. As the code already sets the co-ordinates via the '-translate' option of transform(), further modification of the co-ordinates by image() is not wanted.

    The image() method has a number of forms allowing you to change width, height, and scale. There's also a '-scale' option for transform(). Note that if you change the size, you'll also need to adjust the co-ordinates accordingly.

    — Ken

      Ok, thanks!

      The transform() method is new to me. Took a quick look and saw you can do scaling and skewing with it.

      Great learning from your earlier code, many thanks :))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-16 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found