Message-ID: <9624da290810210610p1508823cy46bbc479788ad083@mail.gmail.com> Date: Tue, 21 Oct 2008 09:10:21 -0400 From: "Matt Gessner" In-Reply-To: <48FDB8B2.4030308@gmx.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5307_19552636.1224594621153" References: <9624da290810201121r480f57d6vce5a783da0272046@mail.gmail.com> <48FDB8B2.4030308@gmx.de> Subject: Re: [Printing-architecture] ijs_invoke_server with hpijs List-Id: Printing architecture under linux List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tobias Hoffmann Cc: printing-architecture@lists.linux-foundation.org ------=_Part_5307_19552636.1224594621153 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Oct 21, 2008 at 7:10 AM, Tobias Hoffmann 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 ------=_Part_5307_19552636.1224594621153 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Oct 21, 2008 at 7:10 AM, Tobias Hoffmann <th55@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

------=_Part_5307_19552636.1224594621153--