Forum Moderators: phranque
I often get complaints that the pages print out a bit oddly....off to the right normally. The problems are caused by all the ads/menues on the pages in question. Whenever I want to guarantee a good print off my own site, I just highlight the "content" with the mouse and print that....comes out like a "print version" of the page with the ads and other formatting. I can't really expect my users to do that.
Without wanting to go through 1500 pages making a separate "printable version" of each, my question is two-fold:
1. Is there any script that would allow me to make printable versions on the fly adding a user defined variable at the end of every URL eg. widget-p.shtml, widget2-p.shtml, widget-red-p.shtml
2. I seem to remember in the foggy darkness of 2000 when I was learning html something about commands you could put on a page for any printing to start and finish only between those points. Anyone help me on that one?
[edited by: esllou at 9:52 am (utc) on May 2, 2004]
Hope this helps.
NS
there was a trailing comma in other link...i had same problem
I have contacted the author about customization...I will have this baby up and running by mid-week on the whole site. Saves me lot of sleepless nights worrying about margins, pixels, table widths, logos, ads, menus, etc, etc
the Print friendly URL
leads to a 404?
Hey esllou thanks for correcting it :)
how much customization can you do...can you put your own logo into the resulting printable version...menu?
Also, remember, you can have separate CSS file for the printely friendly version if you wish to do so. So adding menu with its own formatting for printer friendly page should not be hard to do.
P.S.. Nice idea.. I might add the logo(or maybe just header fonts) on the printer friendly page too.. also, it might be wise, to make it black & white.
I've just finished implementing printer-friendly pages on a messsage board, output from server-side software. I had no control over the HTML, but it was so easy to format the printed pages - three hours work at most.
three hours work at most.
Wow.. 3 hours..
;) using PhPrint it took me about 3 minutes to set it up :)
Also, generally there is no need to change the PHP or anything, it is just the matter of adding 2 lines in your html page and 1 line in your php file (that is if you want css formatting) and you are done :)
I am very much a css1 kind of guy and will leave the more complex css2 until I really need it.
only thing that worried me was the penalties for duplicate content, so I have banned all bots from phprint.php which should save me on that one.
using PhPrint it took me about 3 minutes to set it up
I never believe estmates that short. Nothing is possible in three minutes. Think about it. How many iterations of design, code, test can you fit into three minutes? If you only thought about a software problem for three minutes you'd only get the right answer by pure chance, never mind about trying to implement the solution.
In any case, I was quoting the time it took when working with HTML that I couldn't change. This involved viewing and analysisng the HTML produced by the server-side software and working out how to format the print from that. I'd like to see that done in less than three minutes.
And if you couldn't change the HTML, you wouldn't be able to add any PHP code - ever!
To make my point again. It's easy to produce printer-friendly pages with CSS, and you can do it with CSS when you can't do it any other way, in a remarkably short time.
I never believe estmates that short.
Hum.. :)
Well.. this is the process.
In the HTML of the page just place <!-- startprint --> & <!-- stopprint --> and within the php file, just insert $baseURL="http://www.yoursite.com"; and you are done.
I know for most people this might take less then 3 minutes.. but I think it took me whole 3 minutes. :)
Trust me, PhPrint is really easy and it works too.
It's not, incidentally, clear to me how your script would actually control the layout of the printed page. I'm no PHP expert but it looks to me as though it would just print the part of the page between <!-- startprint --> & <!-- stopprint -->, precisely as it appears on the screen. Hardly fits the description of "printer friendly".
I admit, with a bit more work, you could produce a printer friendly page wth PHP. But that would involve a bit more work: designing the layout, checking that what you get is what you originally wanted, amending the code to improve the look of the print etc. And that, my friend, would take time.
I'm sure PhPrint is easy to use. However, software is not a substitute for thinking.
Issues to be resolved include:
Then, after you've implemented whatever you have to look at the result and check to make sure it looks okay. If it doesn't, repeat stage one (ie thinking).
None of this can be accomplished by code, of whatever nature.
Incidentally, I went to your site and couldn't find the link. But what's wrong with a visitor using the print facility in their browser? A print link involves messages back and forth to the server; printing via the browser is done locally.
I have to agree with you. However I assume original poster was looking for a solution that would be something similer to what I have been using. Hence the recommendatin of PHPrint. In addition, I am not making any claims that PHPrint is the best option for everyone, even though it is for me.
I totally agree with you in all your point. However for individuals like me who do not really know much about modifying php, a script like PHPrint can actually be a real blessing :)
[edited by: Brett_Tabke at 7:36 pm (utc) on May 4, 2004]
[edit reason] no self/promotional urls please [/edit]