PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My php version is 5.1.6 and OS is WinXP.The printer is OKI microline3321 dot matrix.Here is the code:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
"What reference did you use to write code that code?"
ole I use the manual of php on php.net.I dont get what you mean.Maybe my english is not so good.
Is the code wrong?
Feyd you mean that I send the entire output to a pdf file and from there I do the printing?Php is not able to print to custom(not A4) size?This is what I want and the function printer_set_option does that,but when I send to the printer it is ignored...Is there a default size that php prints anyway?
So feyd I must redirect the printing to a pdf file and from there I can print everything.Do you know if I can use the same "layout" in the pdf file,as the one that I send to the printer,I mean the gap between the words,some diagrams that I want in a proper position etc.Also I must say that the printing that I need is consisted of very much pdf pages maybe more over than 20.000 pages...Is this possible?
Please allow me also another question.Can I use java to make that printing?Can I call a java program from php?
Thanks in advance.
o you know if I can use the same "layout" in the pdf file,as the one that I send to the printer,I mean the gap between the words,some diagrams that I want in a proper position etc.
Yes you can. PDF is designed for ensuring consistency of design, if not by default, certainly with a bit of tweaking.
Also I must say that the printing that I need is consisted of very much pdf pages maybe more over than 20.000 pages...Is this possible?
Again this is another thing the PDF format has been designed to do. Although I'm not sure how long it will take PHP to generate such a document. You may need to cache the resultant files.
Please allow me also another question.Can I use java to make that printing?Can I call a java program from php?
You could instead grab a class from http://www.phpclasses.org for PDF generation, I'm sure you'll find what you are looking for, and what's better, there is a class that is not dependant on any DLL Have fun searching.