Re: [PHP] Printing PDF

2010-12-29 Thread Paul M Foster
On Wed, Dec 29, 2010 at 12:24:14PM -0500, Steve Staples wrote:

> On Wed, 2010-12-29 at 11:49 -0500, Paul M Foster wrote:
> > On Wed, Dec 29, 2010 at 10:36:30AM -0500, Steve Staples wrote:
> >
> > > Hi!
> > >
> > > I have an app that needs to be created, and it is all running on linux.
> > > I am sure I shoulnd't really write it using PHP, but it's kinda what I
> > > know, and am familiar with... so I am thinking about doing with PHP.
> > >
> > > Anyway, for simplicity sake, i am creating a pdf through php (no
> > > problems there) and it needs to be printed.  I've never done printing on
> > > linux, but is there an easy way to send the pdf print job via command
> > > lines to the local (or network) printer?
> > >
> > > a friend of mine said "postscript" or "cups", but I am not familiar with
> > > them, so I thought I would ask you GURU's here :)
> >
> > The big problem here is that the site is on the server and the printer
> > is on the client (most likely). Normally if you provide a link to a PDF
> > in a webpage, the user/client downloads that PDF and the browser tries
> > to open it in whatever program it thinks is good for that (like XPDF
> > under Linux). The program in which it opens the PDF will have an option
> > to print the file. I've been printing invoices, checks and reports out
> > of my corporate system for years this way.
> >
> > Paul
> >
> 
> actually... it is a localized app (it should be more of a C++ or Java
> (or even Python), but I know PHP more weller than the others... and
> there is also a few other things they want... so right now, it will be
> on the local machine, but down the road, it will be on a "server", but
> it is all on the local intranet, so the printers will be accessible.
> this is not a "world" app, just internal.
> 
> I can create the PDF's no problem, it is just how to send the created
> pdf to the printer to print (it is a label printer, printing 3x5 labels)

I have heard of (and seen) some Javascript code which can be embedded
in a PDF to make it print without the need for what I described. But I
don't recall where I saw it. Might have been on this list, so you could
check the archives.

Paul

-- 
Paul M. Foster
http://noferblatz.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread David Hutto
On Wed, Dec 29, 2010 at 3:13 PM, Steve Staples  wrote:
> On Wed, 2010-12-29 at 17:36 +, Richard Quadling wrote:
>> On 29 December 2010 17:24, Steve Staples  wrote:
>> > I can create the PDF's no problem, it is just how to send the created
>> > pdf to the printer to print (it is a label printer, printing 3x5 labels)
>>
>> What type of printer? Some printers require their own language and
>> won't have any sort of PS, PCL, Esc/2 or GDI support.
>>
>> I've worked with industrial printers which take strings of plain text
>> to do page layout/description. You load template layouts into the
>> printer and can use them.
>>
>> Completely useless under normal circumstances.
>>
>> If the printer is something like an Epson TM-L90 (thermal label
>> printer with barcode support), then sending it a PDF isn't possible as
>> it doesn't have PS support. It is much easier to send it the string of
>> codes to have the barcode generated within the label.
>>
>> On Windows, the drivers deal with all of this stuff. I've no idea on Unix.
>>
>> The exact model of the printer would help.
>
> I am currently unaware of the printer model, I am mostly working at
> building a quote for them.

Welcome to being a software developer.

 I suppose I should get the make/models of
> what they are going to be using... and hope to hell that they are
> compatible.  I do know that the printer has a custom formatted label, so
> I hope that there is some drivers or wahtever availble to linux that i
> can send the PDF to it to print... looks like this will be some trial
> and error (err... research and development?).   The printing is the only
> real trivial part of the whole thing.
>.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread Steve Staples
On Wed, 2010-12-29 at 17:36 +, Richard Quadling wrote:
> On 29 December 2010 17:24, Steve Staples  wrote:
> > I can create the PDF's no problem, it is just how to send the created
> > pdf to the printer to print (it is a label printer, printing 3x5 labels)
> 
> What type of printer? Some printers require their own language and
> won't have any sort of PS, PCL, Esc/2 or GDI support.
> 
> I've worked with industrial printers which take strings of plain text
> to do page layout/description. You load template layouts into the
> printer and can use them.
> 
> Completely useless under normal circumstances.
> 
> If the printer is something like an Epson TM-L90 (thermal label
> printer with barcode support), then sending it a PDF isn't possible as
> it doesn't have PS support. It is much easier to send it the string of
> codes to have the barcode generated within the label.
> 
> On Windows, the drivers deal with all of this stuff. I've no idea on Unix.
> 
> The exact model of the printer would help.

I am currently unaware of the printer model, I am mostly working at
building a quote for them.   I suppose I should get the make/models of
what they are going to be using... and hope to hell that they are
compatible.  I do know that the printer has a custom formatted label, so
I hope that there is some drivers or wahtever availble to linux that i
can send the PDF to it to print... looks like this will be some trial
and error (err... research and development?).   The printing is the only
real trivial part of the whole thing.

maybe i should just make this all a greenscreen app, using windows .bat
scripting :)

thanks for all your insight, and once i get some more information, and
after googleing some, if i have MORE questions, i'll be back!!

hope everyone's holidays (if you celebrated any over the last few weeks)
were good, and the new year treats you well!

Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread Richard Quadling
On 29 December 2010 17:24, Steve Staples  wrote:
> I can create the PDF's no problem, it is just how to send the created
> pdf to the printer to print (it is a label printer, printing 3x5 labels)

What type of printer? Some printers require their own language and
won't have any sort of PS, PCL, Esc/2 or GDI support.

I've worked with industrial printers which take strings of plain text
to do page layout/description. You load template layouts into the
printer and can use them.

Completely useless under normal circumstances.

If the printer is something like an Epson TM-L90 (thermal label
printer with barcode support), then sending it a PDF isn't possible as
it doesn't have PS support. It is much easier to send it the string of
codes to have the barcode generated within the label.

On Windows, the drivers deal with all of this stuff. I've no idea on Unix.

The exact model of the printer would help.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread Steve Staples
On Wed, 2010-12-29 at 11:49 -0500, Paul M Foster wrote:
> On Wed, Dec 29, 2010 at 10:36:30AM -0500, Steve Staples wrote:
> 
> > Hi!
> > 
> > I have an app that needs to be created, and it is all running on linux.
> > I am sure I shoulnd't really write it using PHP, but it's kinda what I
> > know, and am familiar with... so I am thinking about doing with PHP.
> > 
> > Anyway, for simplicity sake, i am creating a pdf through php (no
> > problems there) and it needs to be printed.  I've never done printing on
> > linux, but is there an easy way to send the pdf print job via command
> > lines to the local (or network) printer?
> > 
> > a friend of mine said "postscript" or "cups", but I am not familiar with
> > them, so I thought I would ask you GURU's here :)
> 
> The big problem here is that the site is on the server and the printer
> is on the client (most likely). Normally if you provide a link to a PDF
> in a webpage, the user/client downloads that PDF and the browser tries
> to open it in whatever program it thinks is good for that (like XPDF
> under Linux). The program in which it opens the PDF will have an option
> to print the file. I've been printing invoices, checks and reports out
> of my corporate system for years this way.
> 
> Paul
> 

actually... it is a localized app (it should be more of a C++ or Java
(or even Python), but I know PHP more weller than the others... and
there is also a few other things they want... so right now, it will be
on the local machine, but down the road, it will be on a "server", but
it is all on the local intranet, so the printers will be accessible.
this is not a "world" app, just internal.

I can create the PDF's no problem, it is just how to send the created
pdf to the printer to print (it is a label printer, printing 3x5 labels)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread Paul M Foster
On Wed, Dec 29, 2010 at 10:36:30AM -0500, Steve Staples wrote:

> Hi!
> 
> I have an app that needs to be created, and it is all running on linux.
> I am sure I shoulnd't really write it using PHP, but it's kinda what I
> know, and am familiar with... so I am thinking about doing with PHP.
> 
> Anyway, for simplicity sake, i am creating a pdf through php (no
> problems there) and it needs to be printed.  I've never done printing on
> linux, but is there an easy way to send the pdf print job via command
> lines to the local (or network) printer?
> 
> a friend of mine said "postscript" or "cups", but I am not familiar with
> them, so I thought I would ask you GURU's here :)

The big problem here is that the site is on the server and the printer
is on the client (most likely). Normally if you provide a link to a PDF
in a webpage, the user/client downloads that PDF and the browser tries
to open it in whatever program it thinks is good for that (like XPDF
under Linux). The program in which it opens the PDF will have an option
to print the file. I've been printing invoices, checks and reports out
of my corporate system for years this way.

Paul

-- 
Paul M. Foster
http://noferblatz.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing PDF

2010-12-29 Thread Greg Bair
On Wed, 29 Dec 2010 10:36:30 -0500
Steve Staples  wrote:

> Hi!
> 
> I have an app that needs to be created, and it is all running on
> linux. I am sure I shoulnd't really write it using PHP, but it's
> kinda what I know, and am familiar with... so I am thinking about
> doing with PHP.
> 
> Anyway, for simplicity sake, i am creating a pdf through php (no
> problems there) and it needs to be printed.  I've never done printing
> on linux, but is there an easy way to send the pdf print job via
> command lines to the local (or network) printer?
> 
> a friend of mine said "postscript" or "cups", but I am not familiar
> with them, so I thought I would ask you GURU's here :)
> 
> thank in advance!
> 
> Steve
> 
> 
You could use the lpr command.  Info here :
http://www.marksanborn.net/linux/printing-from-the-linux-command-line/

Greg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php