G'day djlerman,
I ran a few tests:
-
Your HTML (<html>...</html>) by itself renders with an image.
-
Your code, as written, generates PDF without an image: I tried with both piping to xpdf and redirecting to a file and opening that file with two different PDF viewers.
-
I saved the image (from the base64 data) generated in the pure HTML test as a JPEG file and used that filename in the src attribute in your code: the generated PDF still had no image.
-
I also tried replacing the to_string() method with the to_file() method: again, PDF had no image.
There are 22 new/open bugs (raised at various times over the last decade): Active bugs for HTML-HTMLDoc.
The current version (0.10) was written 9 years ago.
There was a developer release (0.11_01) 5 years ago.
Here's a list of releases.
Maintainance of this module appears to have been abandoned.
The author didn't even reply to this (from 5 years ago): Bug #47649 for HTML-HTMLDoc: Question about maintenance for HTML::HTMLDoc.
You can raise a bug report but I wouldn't hold my breath waiting for a fix.
In your situation, I'd probably be looking for an alternative solution that didn't involve this module.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.