aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge V Shistarev <madlynxed@gmail.com>2013-09-07 00:05:03 +0900
committerSerge V Shistarev <madlynxed@gmail.com>2013-09-07 00:05:03 +0900
commit4b36aca0362bed5406e4ba7af02753c6b6484332 (patch)
treeba5155cc8ef47bbac1f4ea2c18d716b78f65b690
downloadricoh-sp100-4b36aca0362bed5406e4ba7af02753c6b6484332.tar.gz
Quick and dirty initial commit of a quick and dirty initial state
-rw-r--r--README.md1
-rw-r--r--RICOH_Aficio_SP_100.ppd125
-rwxr-xr-xpstoricohddst-gdi64
3 files changed, 190 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6bb8e42
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+Driver and CUPS filter for Ricoh Aficio SP-100 family laser printers
diff --git a/RICOH_Aficio_SP_100.ppd b/RICOH_Aficio_SP_100.ppd
new file mode 100644
index 0000000..50c88dc
--- /dev/null
+++ b/RICOH_Aficio_SP_100.ppd
@@ -0,0 +1,125 @@
+*PPD-Adobe: "4.3"
+*%%%% PPD file for Ricoh Aficio SP 100 with CUPS.
+*%%%% Created by Serge V Shistarev from PPD built for Ricoh Aficio SP 1000S
+*FormatVersion: "4.3"
+*FileVersion: "1.0"
+*LanguageVersion: English
+*LanguageEncoding: ISOLatin1
+*PCFileName: "rsp100.ppd"
+*Product: "(Ricoh Aficio SP 100)"
+*Manufacturer: "Ricoh"
+*ModelName: "Ricoh Aficio SP 100"
+*ShortNickName: "Ricoh Aficio SP 100"
+*NickName: "Ricoh Aficio SP 100, pstoricohddst-gdi 0.2"
+*PSVersion: "(3010.000) 0"
+*LanguageLevel: "3"
+*ColorDevice: False
+*DefaultColorSpace: Gray
+*FileSystem: False
+*Throughput: "1"
+*LandscapeOrientation: Plus90
+*TTRasterizer: Type42
+*% Driver-defined attributes...
+*1284DeviceID: "MFG:MFPrinter ;MDL:Laser Pro LL;CMD:AUTOMATIC,PJL,GDI_RL;DES:MFPrinter Laser Pro LL;CLS:PRINTER;VER:v1.03e ;NS:L507124L8090042;"
+*cupsVersion: 1.6
+*cupsModelNumber: 0
+*cupsManualCopies: False
+*cupsFilter: "application/vnd.cups-postscript 100 pstoricohddst-gdi"
+*cupsLanguages: "en"
+*OpenUI *PageSize/Media Size: PickOne
+*OrderDependency: 10 AnySetup *PageSize
+*DefaultPageSize: A4
+*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
+*PageSize A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice"
+*PageSize A6/A6: "<</PageSize[297 420]/ImagingBBox null>>setpagedevice"
+*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+*PageSize B5/JIS B5: "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
+*PageSize B6/JIS B6: "<</PageSize[363 516]/ImagingBBox null>>setpagedevice"
+*PageSize Monarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageSize
+*OpenUI *PageRegion/Media Size: PickOne
+*OrderDependency: 10 AnySetup *PageRegion
+*DefaultPageRegion: A4
+*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
+*PageRegion A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice"
+*PageRegion A6/A6: "<</PageSize[297 420]/ImagingBBox null>>setpagedevice"
+*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+*PageRegion B5/JIS B5: "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
+*PageRegion B6/JIS B6: "<</PageSize[363 516]/ImagingBBox null>>setpagedevice"
+*PageRegion Monarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageRegion
+*DefaultImageableArea: A4
+*ImageableArea A4/A4: "12 12 583 830"
+*ImageableArea A5/A5: "12 12 408 583"
+*ImageableArea A6/A6: "12 12 285 408"
+*ImageableArea Letter/US Letter: "12 12 600 780"
+*ImageableArea Legal/US Legal: "12 12 600 996"
+*ImageableArea B5/JIS B5: "12 12 504 717"
+*ImageableArea B6/JIS B6: "12 12 351 504"
+*ImageableArea Monarch/Envelope Monarch: "12 12 267 528"
+*DefaultPaperDimension: A4
+*PaperDimension A4/A4: "595 842"
+*PaperDimension A5/A5: "420 595"
+*PaperDimension A6/A6: "297 420"
+*PaperDimension Letter/US Letter: "612 792"
+*PaperDimension Legal/US Legal: "612 1008"
+*PaperDimension B5/JIS B5: "516 729"
+*PaperDimension B6/JIS B6: "363 516"
+*PaperDimension Monarch/Envelope Monarch: "279 540"
+*OpenUI *MediaType/Media Type: PickOne
+*OrderDependency: 10 AnySetup *MediaType
+*DefaultMediaType: Auto
+*MediaType Auto/Auto: "<</MediaType(Auto)/cupsMediaType 0>>setpagedevice"
+*MediaType Heavyweight/Heavyweight: "<</MediaType(Heavyweight)/cupsMediaType 3>>setpagedevice"
+*CloseUI: *MediaType
+*OpenUI *InputSlot/Media Source: PickOne
+*OrderDependency: 10 AnySetup *InputSlot
+*DefaultInputSlot: Auto
+*InputSlot Auto/Auto: "<</MediaPosition 0>>setpagedevice"
+*InputSlot Automatic/Automatic Tray: "<</MediaPosition 1>>setpagedevice"
+*InputSlot Manual/Manual Tray: "<</MediaPosition 3>>setpagedevice"
+*CloseUI: *InputSlot
+*OpenUI *Resolution/Resolution: PickOne
+*OrderDependency: 10 AnySetup *Resolution
+*DefaultResolution: 600dpi
+*Resolution 600dpi/600 DPI: "<</HWResolution[600 600]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
+*CloseUI: *Resolution
+*DefaultFont: Courier
+*Font AvantGarde-Book: Standard "(1.05)" Standard ROM
+*Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM
+*Font AvantGarde-Demi: Standard "(1.05)" Standard ROM
+*Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM
+*Font Bookman-Demi: Standard "(1.05)" Standard ROM
+*Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM
+*Font Bookman-Light: Standard "(1.05)" Standard ROM
+*Font Bookman-LightItalic: Standard "(1.05)" Standard ROM
+*Font Courier: Standard "(1.05)" Standard ROM
+*Font Courier-Bold: Standard "(1.05)" Standard ROM
+*Font Courier-BoldOblique: Standard "(1.05)" Standard ROM
+*Font Courier-Oblique: Standard "(1.05)" Standard ROM
+*Font Helvetica: Standard "(1.05)" Standard ROM
+*Font Helvetica-Bold: Standard "(1.05)" Standard ROM
+*Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM
+*Font Helvetica-Narrow: Standard "(1.05)" Standard ROM
+*Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM
+*Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM
+*Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM
+*Font Helvetica-Oblique: Standard "(1.05)" Standard ROM
+*Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM
+*Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM
+*Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM
+*Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM
+*Font Palatino-Bold: Standard "(1.05)" Standard ROM
+*Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM
+*Font Palatino-Italic: Standard "(1.05)" Standard ROM
+*Font Palatino-Roman: Standard "(1.05)" Standard ROM
+*Font Symbol: Special "(001.005)" Special ROM
+*Font Times-Bold: Standard "(1.05)" Standard ROM
+*Font Times-BoldItalic: Standard "(1.05)" Standard ROM
+*Font Times-Italic: Standard "(1.05)" Standard ROM
+*Font Times-Roman: Standard "(1.05)" Standard ROM
+*Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM
+*Font ZapfDingbats: Special "(001.005)" Special ROM
+*% End of rsp100.ppd, 06096 bytes.
diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi
new file mode 100755
index 0000000..a0e66c2
--- /dev/null
+++ b/pstoricohddst-gdi
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+user="$2"
+ptitle="$3"
+ddate="`LC_ALL=en_US.UTF-8 date '+%Y/%m/%d %H:%M:%S'`"
+uid="/tmp/pstoricohddst-gdi-`uuidgen`"
+
+[ "`whoami`" = "lp" ] || uid=/tmp/aaaaaaaaaaaaaa
+#rm $uid/*
+mkdir -p $uid
+
+#cat > /tmp/raster.ps
+#gs -sDEVICE=psmono -sOutputFile=/tmp/psmono.ps -r600 -dBATCH -dNOPAUSE /tmp/raster.ps
+#gs -sDEVICE=pbmraw -sOutputFile=/tmp/raster.pbm -r600 -dBATCH -dNOPAUSE /tmp/psmono.ps
+#pbmtojbg -p 72 -o 3 -m 0 -q < /tmp/raster.pbm > /tmp/raster.jbig
+
+gs -sDEVICE=psmono -sOutputFile=- -r600 -dQUIET -dBATCH -dNOPAUSE - | gs -sDEVICE=pbmraw -sOutputFile=${uid}/%d-page.pbm -r600 -dQUIET -dBATCH -dNOPAUSE -
+
+cat <<EOF
+%-12345X@PJL
+@PJL SET TIMESTAMP=$ddate
+@PJL SET FILENAME=Document
+@PJL SET COMPRESS=JBIG
+@PJL SET USERNAME=$user
+@PJL SET COVER=OFF
+@PJL SET HOLD=OFF
+EOF
+
+ls $uid/ | grep 'pbm$' | sort -n | while read page; do
+
+ pbmtojbg -p 72 -o 3 -m 0 -q < $uid/$page > $uid/raster.jbig
+ jsize=`wc -c < $uid/raster.jbig`
+ read fn ft xs ys garb < <(identify $uid/raster.jbig | tr "x" " ")
+
+ cat <<EOF
+@PJL SET PAGESTATUS=START
+@PJL SET COPIES=1
+@PJL SET MEDIASOURCE=AUTO
+@PJL SET MEDIATYPE=PLAINRECYCLE
+@PJL SET PAPER=A4
+@PJL SET PAPERWIDTH=$xs
+@PJL SET PAPERLENGTH=$ys
+@PJL SET RESOLUTION=600
+@PJL SET IMAGELEN=$jsize
+EOF
+
+ cat $uid/raster.jbig
+
+ cat <<EOF
+@PJL SET DOTCOUNT=1132782
+@PJL SET PAGESTATUS=END
+EOF
+
+ cp $uid/raster.jbig $uid/$page
+ # next page, if exist
+
+done
+
+cat <<EOF
+@PJL EOJ
+%-12345X
+EOF
+
+rm -r $uid