akwe-xavante,

I just did this last week, and I have to say it was quite complicated. I haven't had to move the "cursor" on paper since plotter days. Not to discourage you, but you are taking on a difficult task.

Since you're on Linux and your creating the html already, why not use a system utility to convert the html to pdf. I 'googled' and 'duckduckgo.com' and found several linux utilities that convert html to pdf. If you test it from the command line, then you could call the 'system' function or 'qx//' then use the output(file) to attach in the email.

I did use PDF::API2 and it worked great. I created a template by using an array:

my @document = ( " ", " ", "Email Address: $Email", "Company Name: $Company", ... );
Each element in the array represents a line in the pdf document. That way the subroutine could process each line in a while loop. All the variables were initialized before the call to the PDF_Create subroutine, which is what I think you want to do.

Good Luck

"Well done is better than well said." - Benjamin Franklin


In reply to Re: PDF::API2 Questions by flexvault
in thread PDF::API2 Questions by akwe-xavante

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.