Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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,

In reply to Printer Friendly Pages by arashi

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2023-06-07 00:16 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.