[Printing-architecture] ijs_invoke_server with hpijs

Matt Gessner magembcons at gmail.com
Tue Oct 21 06:10:21 PDT 2008


On Tue, Oct 21, 2008 at 7:10 AM, Tobias Hoffmann <th55 at gmx.de> wrote:

> Matt Gessner wrote:
>
>> I need to know how to set the OutputFD parameter given to hpijs.
>>
>> I've tried opening several different files, and I always end up with
>> "unable to read client data" coming from hpijs.
>
>

>
>>  - does it work with OutputFile instead?


OutputFile doesn't appear to be supported by hpijs.  hpijs.cpp shows only
OutputFD to be supported.


>
> - does it work with the ijs_server_example from the ijs package instead of
> hpijs?




>
>
> The ijs_client_example source code does help to clarify the API, when in
> doubt.


The ijs_client_example source code only goes so far, though.  It doesn't
show me the VALUE to give to hpijs for OutputFD.


>
> You can also look at the pdftoijs print filter:
>
> http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/pdftoraster/branches/gsoc2008_pdftoijs_nocups/src/pdftoijs.cc?root=opfc&view=auto
>

I will look at this.  Since it's not using cups, that looks like it has
great potential.


>
> Two other thoughts, though:
> - the error "unable to read client data" suggests to me, that the problem
> occurs way before anything related to the OutputFD happens, but you probably
> have looked deeper
>

Yes, I have.  That error is being generated by a read() on the OutputFD,
IIRC.  Since I don't know what to open, the things I'm doing now to get an
fd that I assign to OutputFD aren't working.


>
> - the dup()/pipe()/open() or whatever you use to create the file descriptor
> has to happen before the ijs_invoke_server, so that the descriptor is
>  available to the forked process.


Yes; I'm doing it that way.  I open the file descriptor first, then invoke
ijs_invoke_server ("/usr/bin/hpijs"), and then set OutputFD via the set
parameter method.

I'm still digging.

Thanks for your comments!

I did some other poking around, and it looks like I might need something
from hpmud, which appears to be able to open USB endpoints.  I'm going to
check that out later today.

Regards,

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/printing-architecture/attachments/20081021/725ce376/attachment-0001.htm 


More information about the Printing-architecture mailing list