Greetings Fellow Monks,

Problem Background
My office and I have recently completed a new HTML template for use on our websites. We're using a very "modular" approach to our pages, making as much as possible written by a centrally located script. The template is written so that several variables are defined, then the central script (currently in JavaScript) writes the layout of the page, leaving only content for users to define. We don't have a Perl server at this time, we're still playing the "Political Game" with our superiors, and we need to force their hand, so we've written the template so the page width is just a little bit too big to be printed out nicely. Our hope is to write a Perl script that will take in the HTML page, strip what isn't needed, and return that "printer friendly" version to the user. Once our superiors get tired of hearing complaints about pages not printing nicely, they'll demand a solution, which we'll be all to happy to provide, if we get our server. I know it sounds rather underhanded, and personally I don't like it myself, I hate playing the "Political Game" but they've left us with little choice, the requirements for development on a large website, IMHO, demand the use of a CGI server of some sort.

I've searched Perl Monks for information about "printer friendly" scripts, but all I found was questions about making nodes on the site printer friendly.

The Questions
Are there any modules that can accomplish converting a page to a printer friendly version?
Does anyone know of any good resources that can point us in the right direction?
Has anyone written scripts that do similar things, and would be willing to give us suggestions or tips?
We wrote our template with this application in mind, so in comment tags, we have put markers, indicating different sections that could be parsed out in Perl. We also hope to use this script to make out pages Web Accessible (for Blind Browsers, or those with vision problems), by parsing out the different sections and rewriting them in more accessible ways.

Thank you for your help,
Arashi

In reply to Printer Friendly Pages by arashi

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.