JezK
Edit File: sipixa6.upp.xml
<driver id="driver/sipixa6.upp"> <name>sipixa6.upp</name> <url>http://www.openprinting.org/download/printing/sipixa6.upp</url> <thirdpartysupplied /> <execution> <uniprint /> <prototype>psresize -w10.5cm -h14.8cm%E | gs @sipixa6.upp -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -dNOMEDIAATTRS -dNOINTERPOLATE %A%Z -sOutputFile=- - | ( cat -; echo -en '\r\n' ) </prototype> <ppdentry> *DefaultResolution: 360dpi </ppdentry> </execution> <comments> <en> <B>This driver is available in the <A href="https://github.com/OpenPrinting/ghostscript-printer-app">Ghostscript Printer Application</A></B><P> <iframe src="https://snapcraft.io/ghostscript-printer-app/embedded?button=black&summary=true" frameborder="0" width="100%" height="300px" style="border: 1px solid #CCC; border-radius: 2px;"></iframe> To install the driver, simply copy sipixa6.upp into one of the directories listed in the "Search path" which you find in the output of the command "<tt>gs --help</tt>".<p> To set up the printer and print, proceed as follows:<p> First step is to set the proper serial port parameters:<p> <tt>stty -F /dev/ttyS1 115200 crtscts cs8 -cstopb -parenb</tt><p> Your serial port may be <tt>/dev/ttyS0</tt>.<p> First you have to resize the postscript document down to A6:<p> <tt>psresize -w10.5cm -h14.8cm -Pletter old.ps new.ps</tt><p> Then send it through Ghostscript:<p> <tt>gs @sipixa6.upp -sPAPERSIZE=a6 -sOutputFile=new.bin new.ps -c quit</tt><p> After that send the binary file to the printer:<p> </tt>cat new.bin > /dev/ttyS1</tt><p> Ghostscript does not always put a final cr/lf pair at the end of the binary file, so make a 2 byte file with a cr/lf pair. Then do:<p> <tt>cat new.bin fileend.bin > /dev/ttyS1</tt><p> If you use the PPD file provided here together with your printing system, the pages are scaled automatically to fit the A6 paper and the cr/lf is also added automatically.<p> As CUPS URI use:<p> <tt>serial:/dev/ttyS0?baud=115200+size=8+parity=none+stop=1+flow=rtscts</tt><p> Thanks to Mark Small (msmall at eastlink dot ca) for contributing this driver. See also <a href="http://lists.freestandards.org/pipermail/printing-user-general/2006/008607.html">his posting in our forums</a>.<p> UPP files of this driver: sipixa6.upp<p> </en> </comments> <printers> <printer> <id>printer/SiPix-Pocket_Printer_A6</id> </printer> </printers> </driver>