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

Hello, I am trying to generate a bunch of PDF files that contain photos. At the top of each file, I would like to print out the photograph source information (date taken, name of person, etc.). I would like this to be a multi-line paragraph. I know how to write single lines of text, but can't seem to figure out how to write a paragraph. Any help would be appreciated.
Thanks buttroast
  • Comment on PDF::API2 multi-line, wrapped, header paragraph?

Replies are listed 'Best First'.
Re: PDF::API2 multi-line, wrapped, header paragraph?
by kulls (Hermit) on Nov 30, 2005 at 08:01 UTC
      Thanks for the sample code link. Isn't there anything already built into the module so I don't have to use that much code? In one tutorial I found, it mentioned there was a 'paragraph' method, but it didn't work. I think maybe the module underwent some changes since the tutorial was written.
      Thanks buttroast
        Hi, indeed you can use the paragraph method, but like all parts of the pdf::api2 module, it is not to well documented. at first, all lines where printed on top of each other, but that was because i forgot to add a txt->lead() line like in $txt->textstart; $txt->lead(13); $txt->font($font{'bold'},10); $txt->translate($x,$y); $txt->paragraph("$SysDescr", $TextWidth, $ParagrapHeight, align => "left" );