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

Hi All,

I am using PDF::ReportWriter to generate my reports. Is there a way, I can use my custom fonts in this report. With PDF::API2 i am able to use my fonts with $pdf->ttfont(), but couldn't find a equivalent function for ReportWriter module.

Please let me know your inputs.

Thanks

Replies are listed 'Best First'.
Re: PDF::ReportWriter Custom fonts
by derby (Abbot) on Feb 15, 2010 at 16:47 UTC

    According to the docs, can't you use the font attribute of the cell (ala font-size)?

    -derby
      The font attribute takes the font available from the font list and font list only has the core fonts,

      An array of font names ( from the corefonts supported by PDF::API2 ) to set up. When you include a font 'family', a range of fonts ( roman, italic, bold, etc ) are created.

      . I want to add my own .otf files to the font list and use them.

        Ahh ... yeah I don't see that in the source for PDF::ReportWriter; however, it looks like you could probably access the PDF::API2 object and use it's ttffont method but that's not going to be fun.

        -derby