Hello Michal
On Aug 8, 2008, at 11:49 AM, Michał Zieliński wrote:
Hi.
I`m wondering if there is some kind of option to redirect output to
the
printer :)
http://www.kksou.com/php-gtk2/articles/interface-to-receipt-printer-in-a-point-of-sale-system.php
have a look at this link, the author had a PHP-GTK program in mind but
it will also work for printer connected to your server
I`d like to create a functionality for preparing quite a lot of
invoices and
envelopes and after that print it automatically.
At first, I thought about Zend_Pdf, although I don`t know how it
will handle
the creation of document with about 1200-1500 invoices and other
with the
same amount of pages for envelopes. It may take ages. Have someone
used
Zend_Pdf to create so many pages in file?
I have done similar before using fpdf (the php4 predecessor of
Zend_PDF) and that worked very well even for the numbers you are
talking about.
Although i would suggest making 3000 single page documents instead of
2 massive files. Because there is almost no hit in the creation of the
files
but all the processing time is spent in the layout preparation phase.
In my application we prepare a pdf of the metrics in our LDAP
workgroups (the users, their printer usage and pc's)
which we sent to each workgroup administrator for financial review
(they have to pay per unit of all 3 variables). The data retrieval,
file creation of the 130 files and placing it in a email que takes
under 1 sec.
Now I`m thinking about creating simple html pages for invoices and
envelopes. Probably it shouldn`t be a problem to launch printing
automatically after creation via JS. However, the problem which may
occur
here is the way it will print. Don`t know if there is option to mark
where
the end of invoice is and force to print another document on the new
paper.
I think you are describing two problems here
1) You would like to know how to print files automatically from a
webbrowser
i think this an entirely different approach then automated printing
because someone still needs be at the website end pressing the print
button.
Using the above approach you would be able to automate the process
much further
2) you would like to know how to force a page end during the
preparation and creation of the individual invoices/envelopes
there are two way to do this.
- You use the Zend_Pdf build in pages function, which takes care of
this problem very easily.
http://framework.zend.com/manual/en/zend.pdf.pages.html
- You use the Zend_Pdf build in template load and overlay path
http://framework.zend.com/manual/en/zend.pdf.create.html
I`d be very thankfull for any advices on this
Regards,
Mike
--
View this message in context:
http://www.nabble.com/Zend_Pdf-and-printing-in-general-questions-tp18888957p18888957.html
Sent from the Zend Framework mailing list archive at Nabble.com.
also with regards
Bram