Jump to content

[SOLVED] php and printer-friendly view/print functions


boo_lolly

Recommended Posts

first, is this best attempted using php or javascript? i'm sure there are many approaches. you could turn it into a pdf document and have them download it manually. or a .doc file sent to their desktop. or a simple click of the link will activate the default printer. what's the best approach? any advice?

you might be able to do something like this:

 

Person loads your document you have a butotn on it that says print This! it goes to printhis.php?page=page1.php

 

then the printhtis.php takes the $_GET['page']; and runs file_get_contents on that path, returns the outputted xhtml,css and then using a ton of stuff formats it into a pdf and then the user can take that pdf to go.

 

If you are looking for a general solution its gonna be rough, if you have a constant temaplate you might have an easier go.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.