joaca Posted March 23, 2009 Share Posted March 23, 2009 Hi guys, I am trying to get crackin' with php but a few difficulties. I have been trying to print a webpage called mini.php but finding some difficulty. Here is my code: $handle = printer_open(); printer_start_doc($handle, "mini.php"); printer_start_page($handle); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); Where could I be going wrong? Thanx Link to comment https://forums.phpfreaks.com/topic/150732-php-printer-functions-not-working/ Share on other sites More sharing options...
rhodesa Posted March 23, 2009 Share Posted March 23, 2009 i haven't used this module...but i think you need to write to it: <?php $handle = printer_open(); printer_start_doc($handle, "mini.php"); printer_start_page($handle); printer_write($handle, "Text to print"); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); ?> Link to comment https://forums.phpfreaks.com/topic/150732-php-printer-functions-not-working/#findComment-791913 Share on other sites More sharing options...
joaca Posted March 23, 2009 Author Share Posted March 23, 2009 Actually I think that function printer_write($handle, "Text to print"); will print the text "Text to print". It prints directly from code to printer. That doesnt answer my question. Need I say that the printer takes the paper but returns it blank? Ya, it does. Link to comment https://forums.phpfreaks.com/topic/150732-php-printer-functions-not-working/#findComment-791926 Share on other sites More sharing options...
rhodesa Posted March 23, 2009 Share Posted March 23, 2009 ...i was just pointing you in the right direction. i am pretty sure what you are trying to do isn't possible. you could print the html code for the webpage. but, you need to render the webpage as something visual, which php can't do Link to comment https://forums.phpfreaks.com/topic/150732-php-printer-functions-not-working/#findComment-791929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.