boo_lolly Posted December 14, 2007 Share Posted December 14, 2007 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? Quote Link to comment Share on other sites More sharing options...
trq Posted December 14, 2007 Share Posted December 14, 2007 Printing is client-side, php, server-side. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 14, 2007 Share Posted December 14, 2007 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. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted December 14, 2007 Author Share Posted December 14, 2007 i just ended up creating a pdf of the document and added a direct link to the file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.