From codebowl at gmail.com Fri Jul 22 09:12:22 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing Message-ID: <8d9a4280050722061246dfc585@mail.gmail.com> Hello Everyone, Once again i have a question for you guys. I have a list of perspective clients in an mysql database. I would like to send them letters to try to gain them as a client. I know i can use a template engine such as smarty to create the HTML template. Here's the question. Is there a way i could run a script and have it automatically loop each record, send it off to my printer? I know i could do this with javascript to auto print the page i am looking at. Also i know that PHP is serverside and if installed on my remote server there is no way to send it to my local printer, so i was thinking of making a script here on my dev machine that would access the remote db, maybe then there is a way to have PHP or JS send each record to my printer in a batch job. Any suggestions will be appreciated -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/05909164/attachment.html From bpang at bpang.com Fri Jul 22 12:23:16 2005 From: bpang at bpang.com (Brian Pang) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <8d9a4280050722061246dfc585@mail.gmail.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> Message-ID: <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> Short of putting the content into a PDF, I think you're going to have to use the browser to render the html output and then have javascript trigger the printing... but I think you will still have to hit the "OK/Print" button in each print dialog (maybe not). then have javascript call up the next page on setTimeout or something. > Hello Everyone, > > Once again i have a question for you guys. I have a list of perspective > clients in an mysql database. I would like to send them letters to try to > gain them as a client. I know i can use a template engine such as smarty > to > create the HTML template. Here's the question. Is there a way i could run > a > script and have it automatically loop each record, send it off to my > printer? I know i could do this with javascript to auto print the page i > am > looking at. Also i know that PHP is serverside and if installed on my > remote > server there is no way to send it to my local printer, so i was thinking > of > making a script here on my dev machine that would access the remote db, > maybe then there is a way to have PHP or JS send each record to my printer > in a batch job. > > Any suggestions will be appreciated > > -- > Joseph Crawford Jr. > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl@gmail.com > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From scott at crisscott.com Fri Jul 22 12:26:23 2005 From: scott at crisscott.com (Scott Mattocks) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> Message-ID: <42E11E2F.20902@crisscott.com> While I think that using PHP/HTML/Javascript is the wrong way to do this, you could use CSS to make page breaks. (http://www.javascriptkit.com/dhtmltutors/pagebreak.shtml) Then you can output all letters at once and print them with one command. Scott Mattocks Brian Pang wrote: > Short of putting the content into a PDF, I think you're going to have to > use the browser to render the html output and then have javascript trigger > the printing... but I think you will still have to hit the "OK/Print" > button in each print dialog (maybe not). > > then have javascript call up the next page on setTimeout or something. > > >>Hello Everyone, >> >>Once again i have a question for you guys. I have a list of perspective >>clients in an mysql database. I would like to send them letters to try to >>gain them as a client. I know i can use a template engine such as smarty >>to >>create the HTML template. Here's the question. Is there a way i could run >>a >>script and have it automatically loop each record, send it off to my >>printer? I know i could do this with javascript to auto print the page i >>am >>looking at. Also i know that PHP is serverside and if installed on my >>remote >>server there is no way to send it to my local printer, so i was thinking >>of >>making a script here on my dev machine that would access the remote db, >>maybe then there is a way to have PHP or JS send each record to my printer >>in a batch job. >> >>Any suggestions will be appreciated >> >>-- >>Joseph Crawford Jr. >>Codebowl Solutions, Inc. >>1-802-671-2021 >>codebowl@gmail.com >>_______________________________________________ >>New York PHP SIG: Front End Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/front-end >>http://www.nyphp.org >> > > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > -- Scott Mattocks scott@crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks From codebowl at gmail.com Fri Jul 22 12:56:13 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> Message-ID: <8d9a4280050722095645fec38@mail.gmail.com> I have thought about using MS Word however all the data is in a remote mysql db, can MS Word talk to a remote mysql db? If that's the case that would solve my problems. As for the JS thought i found you can have js print automatically but it still brings up the print dialog where you have to hit enter, and i thought of going that route but then again it wouldnt be automatic short of me navigating to each page. -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/130fc19b/attachment.html From bpang at bpang.com Fri Jul 22 13:14:20 2005 From: bpang at bpang.com (Brian Pang) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <8d9a4280050722095645fec38@mail.gmail.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> <8d9a4280050722095645fec38@mail.gmail.com> Message-ID: <52491.127.0.0.1.1122052460.squirrel@www.bpang.com> Assuming your local machine is running linux with php you could retrieve the data from the remove mysql server, and then use php's built-in image functions to place your data on a "page" (the php created image), then send that image to your printer with a system call. I've done something similar before. > I have thought about using MS Word however all the data is in a remote > mysql > db, can MS Word talk to a remote mysql db? If that's the case that would > solve my problems. As for the JS thought i found you can have js print > automatically but it still brings up the print dialog where you have to > hit > enter, and i thought of going that route but then again it wouldnt be > automatic short of me navigating to each page. > > -- > Joseph Crawford Jr. > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl@gmail.com > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From agfische at email.smith.edu Fri Jul 22 13:15:20 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <8d9a4280050722095645fec38@mail.gmail.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> <8d9a4280050722095645fec38@mail.gmail.com> Message-ID: <86de9e48a2de37b2943860a167e90ee0@email.smith.edu> I don't think Word can connect direct to mysql. (someone tell me if i'm wrong). I connect to remote mysql db using Access. Then of course it's a piece of cake to have access and word talk to each other for a mail merge. To set up access, install the mysql ODBC driver on your machine. Then open access, file -> get external data, link tables. -Aaron On Jul 22, 2005, at 12:56 PM, Joseph Crawford wrote: > I have thought about using MS Word however all the data is in a remote > mysql db, can MS Word talk to a remote mysql db?? If that's the case > that would solve my problems.? As for the JS thought i found you can > have js print automatically but it still brings up the print dialog > where you have to hit enter, and i thought of going that route but > then again it wouldnt be automatic short of me navigating to each > page. > > -- > Joseph Crawford Jr. > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl@gmail.com_______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1198 bytes Desc: not available Url : http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/363eb359/attachment.bin From codebowl at gmail.com Fri Jul 22 13:17:14 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <52491.127.0.0.1.1122052460.squirrel@www.bpang.com> References: <8d9a4280050722061246dfc585@mail.gmail.com> <51027.127.0.0.1.1122049396.squirrel@www.bpang.com> <8d9a4280050722095645fec38@mail.gmail.com> <52491.127.0.0.1.1122052460.squirrel@www.bpang.com> Message-ID: <8d9a4280050722101754331081@mail.gmail.com> if i were to use php for anything i would do it to make a PDF where each page was a new letter, but was looking for an automatic way of doing all this ;) -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/a9593021/attachment.html From APliszka at AlienForceIT.Com Fri Jul 22 14:06:59 2005 From: APliszka at AlienForceIT.Com (Andrew Pliszka) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <8d9a4280050722061246dfc585@mail.gmail.com> Message-ID: hi, Fast and easy way: 1) send all the client info as emails to yourself (HTML or plain text) 2) Use outlook 2003 and Tools>Rules, create new rule and set it to autoprint new emails. 3) Now all the menus send by you will be printed on your printer. It is easy, and fast way to do it Andrew -----Original Message----- From: front-end-bounces@lists.nyphp.org [mailto:front-end-bounces@lists.nyphp.org]On Behalf Of Joseph Crawford Sent: Friday, July 22, 2005 9:12 AM To: NYPHP Talk; NYPHP SIG: Front End Subject: [front-end] Batch Printing Hello Everyone, Once again i have a question for you guys. I have a list of perspective clients in an mysql database. I would like to send them letters to try to gain them as a client. I know i can use a template engine such as smarty to create the HTML template. Here's the question. Is there a way i could run a script and have it automatically loop each record, send it off to my printer? I know i could do this with javascript to auto print the page i am looking at. Also i know that PHP is serverside and if installed on my remote server there is no way to send it to my local printer, so i was thinking of making a script here on my dev machine that would access the remote db, maybe then there is a way to have PHP or JS send each record to my printer in a batch job. Any suggestions will be appreciated -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/66471c9d/attachment.html From codebowl at gmail.com Fri Jul 22 15:02:43 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: References: <8d9a4280050722061246dfc585@mail.gmail.com> Message-ID: <8d9a4280050722120219bbe771@mail.gmail.com> Outlook? does anyone use that klunky thing anymore ;) can Thunderbird do these same things? -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/3a633cf6/attachment.html From APliszka at AlienForceIT.Com Fri Jul 22 15:11:30 2005 From: APliszka at AlienForceIT.Com (Andrew Pliszka) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: <8d9a4280050722120219bbe771@mail.gmail.com> Message-ID: I would use Thunderbird myself, but it does not have this feature yet :). As soon as they will include auto print in Thunderbird I am switching. I wish there was in Thunderbird: 1- email auto print rule 2- as well as play a long loud sound when a new email arrives Andrew -----Original Message----- From: front-end-bounces@lists.nyphp.org [mailto:front-end-bounces@lists.nyphp.org]On Behalf Of Joseph Crawford Sent: Friday, July 22, 2005 3:03 PM To: NYPHP SIG: Front End Subject: Re: [front-end] Batch Printing Outlook? does anyone use that klunky thing anymore ;) can Thunderbird do these same things? -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050722/9bf3d1a5/attachment.html From dcech at phpwerx.net Fri Jul 22 15:26:21 2005 From: dcech at phpwerx.net (Dan Cech) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Batch Printing In-Reply-To: References: Message-ID: <42E1485D.3050306@phpwerx.net> Andrew Pliszka wrote: > I would use Thunderbird myself, but it does not have this feature yet :). As > soon as they will include auto print in Thunderbird I am switching. > > I wish there was in Thunderbird: > > 1- email auto print rule I wonder if this could be implemented in a plugin? > 2- as well as play a long loud sound when a new email arrives This should already be available, you can specify a custom .wav to use for incoming mail notifications. Dan