All of lore.kernel.org
 help / color / mirror / Atom feed
* [Printing-architecture] Associate printer
@ 2008-10-17  5:21 Matt Gessner
  2008-10-17  7:34 ` Tobias Hoffmann
       [not found] ` <48F83E55.7080907@gmx.de>
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Gessner @ 2008-10-17  5:21 UTC (permalink / raw)
  To: printing-architecture

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

Hello,

I have been scouring the web for details trying to figure out how to make
printing with HPIJS work.

I wish to print directly to hpijs w/o going through CUPS, since I'll be
doing this on an embedded system w/ a low power CPU.

I'm missing an important detail.  Can someone point me to an example that
shows how to tell HPIJS which printer I wish to use?  From the 0.35 hpijs
tar ball, I think I have enough information to do other things, but this
part is eluding me.

Thanks in advance,

Matt Gessner

[-- Attachment #2: Type: text/html, Size: 585 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Printing-architecture] Associate printer
  2008-10-17  5:21 [Printing-architecture] Associate printer Matt Gessner
@ 2008-10-17  7:34 ` Tobias Hoffmann
       [not found] ` <48F83E55.7080907@gmx.de>
  1 sibling, 0 replies; 4+ messages in thread
From: Tobias Hoffmann @ 2008-10-17  7:34 UTC (permalink / raw)
  Cc: printing-architecture

Matt Gessner wrote:
> I'm missing an important detail.  Can someone point me to an example 
> that shows how to tell HPIJS which printer I wish to use?  From the 
> 0.35 hpijs tar ball, I think I have enough information to do other 
> things, but this part is eluding me.
All the communication between your program and the hpijs is done via a
protocol called ijs, for which there is a simple library (libijs) under
MIT license. It can be found either as part of the ghostscript
sourcecode or at http://www.linuxprinting.org/ijs/. It includes the
protocol description and an example ijs_client_example using libijs.

Roughly sketched you do:
   ijs_invoke_server("hpijs");
   ijs_client_{open, begin_job}
   ijs_client_set_param({DeviceManufacturer,DeviceModel,....},"*your
values*");
   ijs_client_{begin_page,send_data,...}
   ... more pages and/or jobs and cleanup

   Tobias

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Printing-architecture] Associate printer
       [not found] ` <48F83E55.7080907@gmx.de>
@ 2008-10-17 11:50   ` Matt Gessner
  2008-10-17 12:41     ` Tobias Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Gessner @ 2008-10-17 11:50 UTC (permalink / raw)
  To: Tobias Hoffmann; +Cc: printing-architecture

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

Hello,

On Fri, Oct 17, 2008 at 3:27 AM, Tobias Hoffmann <th55@gmx.de> wrote:

> Matt Gessner wrote:
>
>> I'm missing an important detail.  Can someone point me to an example that
>> shows how to tell HPIJS which printer I wish to use?  From the 0.35 hpijs
>> tar ball, I think I have enough information to do other things, but this
>> part is eluding me.
>>
> All the communication between your program and the hpijs is done via a
> protocol called ijs, for which there is a simple library (libijs) under MIT
> license. It can be found either as part of the ghostscript sourcecode or at
> http://www.linuxprinting.org/ijs/. It includes the protocol description
> and an example ijs_client_example using libijs.
>
> Roughly sketched you do:
>  ijs_invoke_server("hpijs");
>  ijs_client_{open, begin_job}
>  ijs_client_set_param({DeviceManufacturer,DeviceModel,....},"*your
> values*");
>  ijs_client_{begin_page,send_data,...}
>  ... more pages and/or jobs and cleanup
>

Well, I actually understand MOST of that... but I think what I was missing
was the DeviceManufacturer and DeviceModel set_param stuff.

Thanks for filling that in.

So, by specifying the DeviceManufacturer and DeviceModel fields, THAT'S how
HPIJS knows that it's a USB printer versus, say, a network printer or a
parallel printer?  (Does it even support network printers without CUPS?)

Thanks,


>
>  Tobias
>

Matt

[-- Attachment #2: Type: text/html, Size: 2211 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Printing-architecture] Associate printer
  2008-10-17 11:50   ` Matt Gessner
@ 2008-10-17 12:41     ` Tobias Hoffmann
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Hoffmann @ 2008-10-17 12:41 UTC (permalink / raw)
  To: Matt Gessner; +Cc: printing-architecture

Matt Gessner wrote:
> Well, I actually understand MOST of that... but I think what I was 
> missing was the DeviceManufacturer and DeviceModel set_param stuff.
>
> Thanks for filling that in.
>
> So, by specifying the DeviceManufacturer and DeviceModel fields, 
> THAT'S how HPIJS knows that it's a USB printer versus, say, a network 
> printer or a parallel printer?  (Does it even support network printers 
> without CUPS?)
Well, they only specify the "output format" required for the given 
printer-type. How this output data gets to the printer is again up to you.
Cups has several backends for this; they are quite simple.

On the IJS side you'll have to provide either the OutputFD or the 
OutputFile parameter. A common case is
OutputFD = dup(fileno(stdout))    and then pipe the output from your 
printing filter to one of your output backends.
For example with network printers this could be as simple as
ijs-print-filter [inputfile] | netcat printer-ip 9100

Yet can just as well create a pipe() and do everything in one 
application, then again you can first store everything in a temporary 
file, or ...

  Tobias

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-17 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17  5:21 [Printing-architecture] Associate printer Matt Gessner
2008-10-17  7:34 ` Tobias Hoffmann
     [not found] ` <48F83E55.7080907@gmx.de>
2008-10-17 11:50   ` Matt Gessner
2008-10-17 12:41     ` Tobias Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.