I responded on the mod_perl list too. My suggestion is to abandon trying to make this work from mod_perl. The best thing to do would be to create a daemon process that listens for connections from your mod_perl handler and returns either image data, or drops files someplace where you can send img src links to.
This daemon would also be in charge of closing files left open for more than say 10 minutes (the user has moved on by that point).
None of this is going to scale, by the way. Converting PDFs to images isn't really something you want to do on the fly. Sure, it'll work, for the most part, but unless you're creating the document dynamically and then also creating the thumbnails dynamically from that, it's going to be more efficient to convert all of your PDFs to images ahead of time.
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.