[Printing-architecture] Embedded printing

Matt Gessner magembcons at gmail.com
Sun Nov 23 05:11:30 PST 2008


Hi,

What we ended up doing is invoking hp via fork() and exec(), with a pipe
dup'd over the new process's stdout.

Then we did a fork() and exec() and started hp, and set the OutputFD
parameter to the hp's dup'd stdout pipe fd.

Then we used the ijs_client commands (taken from the ijs_client_example,
mostly) to get the printing done.

Part of our system creates the raster in memory before invoking the
printing.  We had to previously agree on the resolution (150x150 -- we're
low on memory) and a full 8.5x11.0 page.  Then I simply converted the raster
from ARGB to RGB (being careful of the system endianness!)

If you would like me to post more details, I'd be happy to do that.
Sometimes people like to figure things out themselves.

It works pretty darn well.  One thing to watch is that you get the
PrintableTopLeft value via ijs_client_get_parm() because it will affect how
your page looks if you want a margin that's greater than the built in one on
the printer.

We used no cups, and no ghostscript.  Another person on the team figured out
how to get it into OE.  I can give you the basics for compiling everything
if you want it.

You need hp, which requires hpmud for USB comms.  You also need hpijs (which
builds the commands and spits them to OutputFD) and libijs (which is the ijs
client stuff).

This was one of several approaches I tried to make this work.  It's the only
one that works.

Oh, I also tore into the ghostscript code to see how it used the hpijs tool,
and that provided an interesting detail or two that saved me some time.  The
rest I figured out via experimentation.

I hope this helps.

Regards,

Matt

On Thu, Nov 20, 2008 at 12:22 AM, chirag Shah <chirag.shah at einfochips.com>wrote:

>  Hi All,
>
> Sorry to copy paste whole thread as i did not find any button to post reply
> on continued thread. Anyway doesn't matter.
> What i would like to ask is, i am in the simillar situation as "Matt".
>
> I am developing an embedded system in which i need to give support of laser
> printers. I am having monta vista linux 2.6 on my ARM based embedded board.
> In that basic kernel i am having support of CUPS through which i was able to
> print only .jpg files. I used lp commands to print .jpg file. But my end
> goal is to print a report which can have text and images combined on same
> page. I am not able to print a simple .txt or .vi file.
>
> For that, i believe i need ghost script support. But my monta vista linux
> is not having support for ghost script. I tried to cross-compile ghost
> script source with my arm tool-chain but it failed.
>
> So, how can i add support of laser printers in my embedded(ARM based)
> system?
>
> Thanks in advance,
> Chirag Shah (A new member eager for favorable reply :) )
>
>
> **
> *Matt Gessner* magembcons at gmail.com
> <printing-architecture at lists.linux-foundation.org?Subject=%5BPrinting-architecture%5D%20Embedded%20printing&In-Reply-To=ED4094DE5E8ACD4BBDACA6AD398E608F1B2746%40EEAEX03.us.epson.net>
> *Mon Oct 13 10:46:18 PDT 2008*
>
>
>    - Previous message: [Printing-architecture] Embedded printing
>    <https://lists.linux-foundation.org/pipermail/printing-architecture/2008/001589.html>
>    - Next message: [Printing-architecture] CANCEL - Next OP SC - Mon/Tue -
>    13/14 October 2008
>    <https://lists.linux-foundation.org/pipermail/printing-architecture/2008/001592.html>
>    - *Messages sorted by:* [ date ]<https://lists.linux-foundation.org/pipermail/printing-architecture/2008/date.html#1590> [
>    thread ]<https://lists.linux-foundation.org/pipermail/printing-architecture/2008/thread.html#1590> [
>    subject ]<https://lists.linux-foundation.org/pipermail/printing-architecture/2008/subject.html#1590> [
>    author ]<https://lists.linux-foundation.org/pipermail/printing-architecture/2008/author.html#1590>
>
>  ------------------------------
>
> Hello, and thank you.
>
> Is the HPIJS solution part of the HPLIP solution?  Or is it something
> different?
>
> On the web page, http://www.linuxprinting.org/ijs there are some drivers
> listed, but I'm confused as to where to go from there?
>
> Also, is there a web page that describes in detail what I need?  Something
> that lays out the architecture of what needs to be done by applications (do
> I need lpd, CUPS, or something else?)  I've skimmed lots of documentation,
> so perhaps I've missed something in my skimming that would answer all my
> questions.
>
> THanks lots,
>
> Matt
>
> On Mon, Oct 13, 2008 at 12:33 PM, Petrie, Glen
> <glen.petrie at eitc.epson.com <https://lists.linux-foundation.org/mailman/listinfo/printing-architecture>>wrote:
>
> >*  Matt,*>**>**>**>* For embedded solutions, IJS (for Epson and others) or HPIJS (for HP*>* printers) is a suggestion.  It is small, MIT open-source driver; and,*>* print-vender drivers typically do not have floating point.   (Contact me for*>* a CD of Epson's version of the IJS.)*>**>**>**>* Epson also has a generic, platform independent, non-floating driver for*>* their desktop inkjet printer. (Contact me if you are interested.)*>**>**>**>* glen*>**>**>*   ------------------------------*>**>* *From:* printing-architecture-bounces at lists.linux-foundation.org <https://lists.linux-foundation.org/mailman/listinfo/printing-architecture> [mailto:*>* printing-architecture-bounces at lists.linux-foundation.org <https://lists.linux-foundation.org/mailman/listinfo/printing-architecture>] *On Behalf Of *Matt*>* Gessner*>* *Sent:* Sunday, October 12, 2008 6:33 PM*>* *To:* printing-architecture at lists.linux-foundation.org <https://lists.linux-foundation.org/mailman/listinfo/printing-architecture>*>* *Subject:* [Printing-architecture] Embedded printing*>**>**>**>* Hi,*>**>* I''m looking for some solutions for doing printing on an embedded system*>* (arm, if it matters).  Raster screen shots and simple text reports are*>* (pretty much) all that's desired.*>**>* One objective is to avoid using anything that requires floating point math,*>* as it's only emulated on this particular arm.*>**>* I've been searcing the lists and can't find anything specific to embedded*>* systems, but in an O'Reilly article from 2007, there's a note that such*>* capabilities would be added in 6 months.  Since we're well past that date,*>* I'm wondering if that's been tackled.*>**>* Would someone please point me to some resources where I could read up on*>* how to do printing on such a system?  I will continue to do my own research,*>* but it sure seems like this is an area where there would be some discussion*>* so I'm hoping this is the right list.*>**>* Thank you.*
>
>
> --
> _____________________________________________________________________
> Disclaimer: This e-mail message and all attachments transmitted with it
> are intended solely for the use of the addressee and may contain legally
> privileged and confidential information. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby
> notified that any dissemination, distribution, copying, or other use of
> this message or its attachments is strictly prohibited. If you have
> received this message in error, please notify the sender immediately by
> replying to this message and please delete it from your computer. Any
> views expressed in this message are those of the individual sender
> unless otherwise stated.Company has taken enough precautions to prevent
> the spread of viruses. However the company accepts no liability for any
> damage caused by any virus transmitted by this email.
> _____________________________________________________________________
>
>
>
>
> _______________________________________________
> Printing-architecture mailing list
> Printing-architecture at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/printing-architecture
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/printing-architecture/attachments/20081123/dc69ca0b/attachment.htm 


More information about the Printing-architecture mailing list