RE: [PHP] Printing on a local printer
| From: | Kraa de Simon | Date: | Sat, 23 Dec 2000 19:14:55 +0000 |
| Subject: | RE: [PHP] Printing on a local printer | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31703@lists.php.net to get a copy of this message | ||
Hello again,
I _have_ to use the pre-printed forms so I can't generate a "browser
version" and simply let the user print it.
I'm on Linux and can't install pdflib or use Adobe software.
Because I am in a controlled environment I could use JS.
Any examples?
Thanks for all your help!
Simon.
> -----Original Message-----
> From: Cynic [mailto:cynic@mail.cz]
> Sent: zaterdag 23 december 2000 18:15
> To: James Moore; Kraa de Simon; Kraa de Simon; Php-General (E-mail)
> Subject: RE: [PHP] Printing on a local printer
>
>
> He needed to print out some forms, and IIRC it was in a
> controled environment, so javascript shouldn't really be
> a problem. BUT, if he can produce images (create image of
> a form? eh, ugly), he can produce PDF documents, as well.
> IF his server is win32 based, and IF either of the two
> PDF libs can't be used on that platform, he would have to
> resort to spending one hell of a budget on Adobe Distiller
> or what it's called, and create the documents in that through
> COM. But this discussion isn't leading nowhere, because we
> don't know what system's he running, whether he can use / buy
> the Adobe software, etc...
>
>
> At 18:10 23.12. 2000, James Moore wrote the following:
> --------------------------------------------------------------
> >Well then we are into dcom.. it requires the user to have to
> correct com
> >objects and also you probably to be running a win 2k server
> then use com to
> >create the word document.. let the user download it (maybe
> its even possible
> >with com to force this to happen) and load it into their
> version of word but
> >I really doubt this is possible.. I can see so many security
> things in there
> >that I dont think you could do it like that.. maybe creating
> an image is an
> >option then using javascript print() (which 99% of the time in 99% of
> >browsers is disabled for obvious reasons) the other option
> is Java appelets
> >or somesuch but thats the best I can come up with.. its not
> easy as it can
> >be used malicously I would be in favour of creating a nice
> HTML page and
> >makeing the user choose file->print from their menu.. thats
> what we normally
> >do in shoppingcart systems with orders and loose the
> horrible pre printed
> >orderforms.
> >
> >James
> >
> >> -----Original Message-----
> >> From: Cynic [mailto:cynic@mail.cz]
> >> Sent: 23 December 2000 17:01
> >> To: James Moore; Kraa de Simon; Kraa de Simon; Php-General (E-mail)
> >> Subject: RE: [PHP] Printing on a local printer
> >>
> >>
> >> James,
> >>
> >> this is nice, but the guy was looking for a way to CREATE
> >> PDF documents WITHOUT pdf_* functions. PLUS he wanted to
> >> print them on the client, not the server, and I hesitate
> >> to assume it's gonna be one machine.
> >>
> >>
> >> At 17:59 23.12. 2000, James Moore wrote the following:
> >> --------------------------------------------------------------
> >> >If itsa all running on a local computer then you might also want
> >> to look at
> >> >COM in PHP to open up your acrobat doc and print it out.. Its
> >> very possible
> >> >but I wouldnt want to be the person doing it as your going to be
> >> using a lot
> >> >of code that hasnt been used thourghly so might run into
> the odd querk..
> >> >rember to report any you find but somthing like
> >> >
> >> ><?php
> >> >// Get Data Here...
> >> >
> >> >$pi = pdf_open(...);
> >> >// Create PDF here using PDF_* functions
> >> >// save PDF
> >> >
> >> >$ai = new COM(application.acrobat);
> >> >$ai.open(pdf file);
> >> >$ai.print();
> >> >$ai.close(pdf file);
> >> >?>
> >> >
> >> >That would print on the server computer.. you would need dcom
> >> etc otherwise
> >> >and Im totally unfamiliar with that but hopefully that
> will give you a
> >> >pointer in the right direction (PS all my functions are probably
> >> wrong and
> >> >are just there to give psudo code).
> >> >
> >> >James
> >> >--
> >> >James Moore
> >> >PHP Quality Assurance Team
> >> >jmoore@php.net
> >> >
> >> >> -----Original Message-----
> >> >> From: Cynic [mailto:cynic@mail.cz]
> >> >> Sent: 23 December 2000 15:58
> >> >> To: Kraa de Simon; Kraa de Simon; Php-General (E-mail)
> >> >> Subject: RE: [PHP] Printing on a local printer
> >> >>
> >> >>
> >> >> No, you cannot.[*]
> >> >> You need a software that will _create_ the PDF's. You wouldn't
> >> >> be able to use mysql_* functions in PHP if MySQL client wasn't
> >> >> compiled into PHP. When you want to create PDF documents from
> >> >> within PHP, you need a software that will do it, and compile
> >> >> PHP with support for that software. You can either use PDFLib
> >> >> or CLibPDF.
> >> >>
> >> >> * You could probably create PDF documents from within PHP
> >> >> _without_ either of these _provided_ you:
> >> >> 1) were on windows,
> >> >> 2) had software from Adobe capable of creating PDF files
> >> >> (not Acrobat Reader - it's called Reader for a reason)
> >> >> 3) that software had COM interface
> >> >> But I'm not sure about this, so don't cite me. :)
> >> >>
> >> >>
> >> >> At 16:43 23.12. 2000, Kraa de Simon wrote the following:
> >> >> --------------------------------------------------------------
> >> >> >But I can use the pdf_* functions _without_ installing
> >> >> additional products
> >> >> >like pdflib?
> >> >> >
> >> >> >When I use pdf_open() is a new PDF file opened in Acrobat or
> >> something???
> >> >> >
> >> >> >Huh???
> >> >> >
> >> >> >> -----Original Message-----
> >> >> >> From: Cynic [mailto:cynic@mail.cz]
> >> >> >> Sent: zaterdag 23 december 2000 16:38
> >> >> >> To: Kraa de Simon; Php-General (E-mail)
> >> >> >> Subject: Re: [PHP] Printing on a local printer
> >> >> >>
> >> >> >>
> >> >> >> I reckon your hair will turn white on this, unless you use
> >> >> >> PDFLib (or the other one) to generate the files. And it might
> >> >> >> even then.
> >> >> >>
> >> >> >>
> >> >> >> At 16:22 23.12. 2000, Kraa de Simon wrote the following:
> >> >> >>
> --------------------------------------------------------------
> >> >> >> >Hi,
> >> >> >> >
> >> >> >> >A customer wants data from an html form printed on
> a local printer.
> >> >> >> >
> >> >> >> >We are talking about pre-printed forms; so only data like
> >> >> >> name, address,
> >> >> >> >price must be send to the printer.
> >> >> >> >
> >> >> >> >How could/should I handle this using PHP?
> >> >> >> >
> >> >> >> >I can't think of anything else of displaying the fields on
> >> >> >> the screen in the
> >> >> >> >right positions and use browser capabilities to
> print the screen?
> >> >> >> >
> >> >> >> >But than I'm sure I will have problems with offset/layout
> >> >> >> >of
> >> >> >> the fields and
> >> >> >> >I don't like this solution.
> >> >> >> >
> >> >> >> >Any advice/help will be appreciated!
> >> >> >> >
> >> >> >> >Simon.
> >> >> >> >
> >> >> >> >--
> >> >> >> >PHP General Mailing List (http://www.php.net/)
> >> >> >> >To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> >> >> >> >For additional commands, e-mail:
> php-general-help@lists.php.net
> >> >> >> >To contact the list administrators, e-mail:
> >> >> >> php-list-admin@lists.php.net
> >> >> >> ------end of quote------
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> ____________________________________________________________
> >> >> >> Cynic:
> >> >> >>
> >> >> >> A member of a group of ancient Greek philosophers who taught
> >> >> >> that virtue constitutes happiness and that self control is
> >> >> >> the essential part of virtue.
> >> >> >>
> >> >> >> cynic@mail.cz
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >> >> >> For additional commands, e-mail:
> php-general-help@lists.php.net
> >> >> >> To contact the list administrators, e-mail:
> >> >> >> php-list-admin@lists.php.net
> >> >> >>
> >> >> ------end of quote------
> >> >>
> >> >>
> >> >>
> >> >> ____________________________________________________________
> >> >> Cynic:
> >> >>
> >> >> A member of a group of ancient Greek philosophers who taught
> >> >> that virtue constitutes happiness and that self control is
> >> >> the essential part of virtue.
> >> >>
> >> >> cynic@mail.cz
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >> >> For additional commands, e-mail: php-general-help@lists.php.net
> >> >> To contact the list administrators, e-mail:
> >> php-list-admin@lists.php.net
> >> ------end of quote------
> >>
> >>
> >>
> >> ____________________________________________________________
> >> Cynic:
> >>
> >> A member of a group of ancient Greek philosophers who taught
> >> that virtue constitutes happiness and that self control is
> >> the essential part of virtue.
> >>
> >> cynic@mail.cz
> >>
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >> For additional commands, e-mail: php-general-help@lists.php.net
> >> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> ------end of quote------
>
>
>
> ____________________________________________________________
> Cynic:
>
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
>
> cynic@mail.cz
>
>