user4fun Posted December 4, 2007 Share Posted December 4, 2007 How can I make sure that a php page will print exactly on a standard 8.5x11 sheet of paper regardless of resolution, screen size, etc, etc.Also, I need a button that prints the document and will not show up on the hard copy.Thank you. Link to comment Share on other sites More sharing options...
Synook Posted December 4, 2007 Share Posted December 4, 2007 This is 8.5" x 11" ? Well, you can make the outermost container (the body even) to have CSS width:8.5in; height:11in; and make everything else in pixels. Also, I need a button that prints the document and will not show up on the hard copy.You can use the @media CSS rule to make the button have display:none for print. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 4, 2007 Share Posted December 4, 2007 How can I make sure that a php page will print exactly on a standard 8.5x11 sheet of paper regardless of resolution, screen size, etc, etc.Turn it into a PDF. PDF files were created specifically to show the exact same thing on every machine. HTML files do not do that, the way an HTML file looks is completely dependent on the client machine. There are PDF libraries that you can use for PHP. Link to comment Share on other sites More sharing options...
user4fun Posted December 5, 2007 Author Share Posted December 5, 2007 I dont know how to turn it into a pdf, The page will automatically generated based on the user request, it will have mostly html code ad some php.I am not so sure that I can create a php page and have it automatically tunred into a pdf. Link to comment Share on other sites More sharing options...
Synook Posted December 5, 2007 Share Posted December 5, 2007 PHP has a very comprehensive PDF library that you can do almost anything PDF-related with: http://au2.php.net/manual/en/ref.pdf.php Link to comment Share on other sites More sharing options...
user4fun Posted December 5, 2007 Author Share Posted December 5, 2007 wow, That is alot of stuff you can play with, Sweeeet. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.