summaryrefslogtreecommitdiff
path: root/src/ghost
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 16:11:05 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 16:11:05 +0000
commit3b59bb0a607ec27ea60f07d1cd5d1bbb4483c832 (patch)
treec119edaa8374e7b6387de7aa7d65b143732af5db /src/ghost
parenteb5718390731a9746c556317e641320b671f2091 (diff)
Imported Upstream version 4.2.7
Diffstat (limited to 'src/ghost')
-rw-r--r--src/ghost/.cvsignore20
-rw-r--r--src/ghost/Makefile539
-rw-r--r--src/ghost/Makefile.am61
-rw-r--r--src/ghost/Makefile.in508
-rw-r--r--src/ghost/README898
-rw-r--r--src/ghost/contrib.mak.addon.old10
-rw-r--r--src/ghost/devs.mak.addon-5.1010
-rw-r--r--src/ghost/gdevstp.c4
-rw-r--r--src/ghost/ijsgimpprint.c1028
9 files changed, 2789 insertions, 289 deletions
diff --git a/src/ghost/.cvsignore b/src/ghost/.cvsignore
deleted file mode 100644
index a50caae..0000000
--- a/src/ghost/.cvsignore
+++ /dev/null
@@ -1,20 +0,0 @@
-Makefile
-Makefile.in
-gdevstp-canon.c
-gdevstp-color.c
-gdevstp-dither.c
-gdevstp-dither-matrices.c
-gdevstp-escp2.c
-gdevstp-lexmark.c
-gdevstp-pcl.c
-gdevstp-printers.c
-gdevstp-ps.c
-gdevstp-util.c
-gdevstp-weave.c
-gdevstp-print.h
-gdevstp-print-internal.h
-gdevstp-print-intl-internal.h
-gdevstp-quickmatrix257.h
-gdevstp-ran.367.179.h
-gdevstp-ran.509.131.h
-contrib.mak.addon
diff --git a/src/ghost/Makefile b/src/ghost/Makefile
new file mode 100644
index 0000000..74950e8
--- /dev/null
+++ b/src/ghost/Makefile
@@ -0,0 +1,539 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ../..
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/Tools//
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/Libraries/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/Libraries//
+infodir = ${prefix}/Library/info
+mandir = ${prefix}/Library/man
+includedir = ${prefix}/Headers//
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/gimp-print
+pkglibdir = $(libdir)/gimp-print
+pkgincludedir = $(includedir)/gimp-print
+
+top_builddir = ../..
+
+ACLOCAL = aclocal -I src/main
+AUTOCONF = autoconf
+AUTOMAKE = automake
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/ginstall -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+ALL_LINGUAS = en_GB sv no fr da pl sk el nl es pt de ja cs nb uk hu
+AS = @AS@
+AWK = gawk
+BISON_PROG = /usr/bin/bison
+BUILD_INCLUDED_LIBINTL = no
+CATALOGS = en_GB.gmo sv.gmo no.gmo fr.gmo da.gmo pl.gmo sk.gmo el.gmo nl.gmo es.gmo pt.gmo de.gmo ja.gmo cs.gmo nb.gmo uk.gmo hu.gmo
+CATOBJEXT = .gmo
+CC = gcc
+CONVERT = /usr/X11R6/bin/convert
+CUPS_BACKEND_BIN = $(CUPS_BACKEND_BIN)
+CUPS_BIN = $(CUPS_BIN)
+CUPS_CFLAGS =
+CUPS_CONF = $(CUPS_CONF)
+CUPS_CONFIG = /usr/bin/cups-config
+CUPS_FILTER_BIN = $(CUPS_FILTER_BIN)
+CUPS_INSTALL =
+CUPS_LIBS = -Wl,-rpath,/usr/lib -lcupsimage -lcups -lssl -lcrypto -lnsl -lcrypt
+CUPS_MAN = $(CUPS_MAN)
+CUPS_NOINST_BIN = $(CUPS_NOINST_BIN)
+CUPS_PKG = $(CUPS_PKG)
+CUPS_PPD_PS_LEVEL = 2
+DATADIRNAME = share
+DB2HTML = /usr/bin/db2html
+DB2PDF = /usr/bin/db2pdf
+DB2PS = /usr/bin/db2ps
+DLLTOOL = @DLLTOOL@
+DVIPDF = /usr/local/Tools/dvipdf
+DVIPS = /usr/bin/dvips
+ECHO = echo
+ESCPUTIL_BIN = $(ESCPUTIL_BIN)
+ESCPUTIL_MAN = $(ESCPUTIL_MAN)
+EXEEXT =
+FOOMATIC_3_NOINST_BIN =
+FOOMATIC_CONFIGURE = /usr/local/bin/foomatic-configure
+FOOMATIC_INSTALL =
+FOOMATIC_KITLOAD = /usr/local/sbin/foomatic-kitload
+FOOMATIC_NOINST_BIN = $(FOOMATIC_NOINST_BIN)
+FOOMATIC_OLDIDS_NOINST_BIN = $(FOOMATIC_OLDIDS_NOINST_BIN)
+FOOMATIC_PPDFILE =
+GENCAT = gencat
+GIMPPRINT_BINARY_AGE = 1
+GIMPPRINT_CFLAGS =
+GIMPPRINT_CURRENT_INTERFACE = 2
+GIMPPRINT_DEPLIBS = -lm
+GIMPPRINT_INTERFACE_AGE = 3
+GIMPPRINT_LIBS = -lgimpprint
+GIMPPRINT_MAJOR_VERSION = 4
+GIMPPRINT_MICRO_VERSION = 7
+GIMPPRINT_MINOR_VERSION = 2
+GIMPPRINT_VERSION = 4.2.7
+GIMPTOOL = /usr/local/Tools/gimptool
+GIMPTOOL_CHECK = /usr/local/Tools/gimptool
+GIMP_BIN = $(GIMP_BIN)
+GIMP_CFLAGS = -I/usr/local/Headers// -I/opt/gnome/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+GIMP_CFLAGS_NOUI = -I/usr/local/Headers// -I/usr/include/glib-1.2 -I/usr/lib/glib/include
+GIMP_DATA_DIR = /usr/local/Libraries/share/gimp/1.2
+GIMP_LIBS = -L/usr/local/Libraries// -lgimpui -lgimp -L/opt/gnome/lib -L/usr/X11R6/lib -lgtk -lgdk -L/usr/lib -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
+GIMP_LIBS_NOUI = -L/usr/local/Libraries// -lgimp -L/usr/lib -lglib
+GIMP_PLUGIN_DIR = /usr/local/Libraries///gimp/1.2
+GLIBC21 = yes
+GMOFILES = en_GB.gmo sv.gmo no.gmo fr.gmo da.gmo pl.gmo sk.gmo el.gmo nl.gmo es.gmo pt.gmo de.gmo ja.gmo cs.gmo nb.gmo uk.gmo hu.gmo
+GMSGFMT = /usr/bin/msgfmt
+GNUCFLAGS = -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -pedantic
+IJS_CFLAGS = -I/usr/local/Headers///ijs
+IJS_CONFIG = /usr/local/Tools/ijs-config
+IJS_INSTALL =
+IJS_LIBS = -L/usr/local/Libraries// -lijs
+INSTOBJEXT = .mo
+INTLBISON = :
+INTLLIBS =
+INTLOBJS =
+INTL_LIBTOOL_SUFFIX_PREFIX =
+LEX = flex
+LIBGIMPPRINT_LIBS = $(top_builddir)/src/main/libgimpprint.la
+LIBICONV =
+LIBM = -lm
+LIBREADLINE_DEPS = -lreadline -lncurses
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBTOOL_DEPS = scripts/ltmain.sh
+LN_S = ln -s
+LTALLOCA =
+LTLIBOBJS = xgetcwd.lo xmalloc.lo
+LT_AGE = 1
+LT_CURRENT = 2
+LT_RELEASE = 4.2
+LT_REVISION = 3
+MAINT =
+MAINTAINER_CFLAGS =
+MAIN_BIN =
+MAIN_DAT =
+MAIN_MAN =
+MAIN_SCR =
+MAKEINFO = makeinfo
+MKINSTALLDIRS = scripts/mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+OBJDUMP = @OBJDUMP@
+OBJEXT = o
+PACKAGE = gimp-print
+PERL = /usr/bin/perl
+PLUG_IN_PATH = admin-bin
+POFILES = en_GB.po sv.po no.po fr.po da.po pl.po sk.po el.po nl.po es.po pt.po de.po ja.po cs.po nb.po uk.po hu.po
+POSUB = po
+PRINT_VASPRINTF =
+RANLIB = ranlib
+RELEASE_DATE = 15 Jul 2004
+RM = rm
+SAMPLE_IMAGES = $(SAMPLE_IMAGES)
+STRIP = strip
+TESTPATTERN_BIN =
+TEST_BIN = $(TEST_BIN)
+TEXI2HTML = /usr/bin/texi2html
+USER_GUIDE = $(USER_GUIDE)
+USE_INCLUDED_LIBINTL = no
+USE_NLS = yes
+VERSION = 4.2.7
+YACC = bison -y
+YACC_PROG =
+cups_bindir = /usr/local/bin
+cups_conf_datadir = /usr/share/cups
+cups_conf_serverbin = /usr/lib/cups
+cups_conf_serverroot = /etc/cups
+cups_exec_prefix = /usr/local
+cups_prefix = /usr/local
+gimp_plug_indir = /usr/local/Libraries///gimp/1.2/plug-ins
+gimpprint_cflags =
+gimpprint_libs = -lgimpprint -lm
+
+AUTOMAKE_OPTIONS = 1.4 gnu
+
+MAINT_CHARSET = latin1
+
+MAINCODE = canon.c color.c dither.c escp2.c escp2-data.c lexmark.c pcl.c printers.c ps.c util.c weave.c dither-matrices.c
+
+
+MAINHEADERS = print.h print-internal.h print-intl-internal.h quickmatrix257.h ran.367.179.h ran.509.131.h print-dither.h print-escp2.h
+
+
+MAINFILES = $(MAINCODE) $(MAINHEADERS)
+#ALL_LOCAL_DEPS = $(srcdir)/$(addprefix gdevstp-,$(MAINCODE)) $(srcdir)/$(addprefix gdevstp-,$(MAINHEADERS))
+ALL_LOCAL_DEPS =
+
+GHCODE = -e 's/print-printers.c/gdevstp-printers.c/' -e 's/^\\\#include "\(gimp\-\)*\(.*\)\.h"$$/\\\#include "gdevstp-\2.h"/' -e 's/^\\\#include <gimp-print\/gimp-print\(.*\)\.h>$$/\\\#include "gdevstp-print\1.h"/'
+
+
+CLEANFILES = $(srcdir)/gdevstp-printers.c $(srcdir)/gdevstp-ran.367.179.h $(srcdir)/gdevstp-ran.509.131.h $(srcdir)/gdevstp-color.c $(srcdir)/gdevstp-print.h $(srcdir)/gdevstp-print-internal.h $(srcdir)/gdevstp-print-intl-internal.h $(srcdir)/gdevstp-quickmatrix257.h $(srcdir)/gdevstp-util.c $(srcdir)/gdevstp-weave.c $(srcdir)/gdevstp-canon.c $(srcdir)/gdevstp-dither.c $(srcdir)/gdevstp-print-dither.h $(srcdir)/gdevstp-dither-matrices.c $(srcdir)/gdevstp-escp2.c $(srcdir)/gdevstp-print-escp2.h $(srcdir)/gdevstp-escp2-data.c $(srcdir)/gdevstp-lexmark.c $(srcdir)/gdevstp-pcl.c $(srcdir)/gdevstp-ps.c
+
+
+# End of old compatability cruft
+
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = COPYING Makefile Makefile.am README README.bsd contrib.mak.addon.in contrib.mak.addon.old debian-patch debian-patch-stp devs.mak.addon-5.10 gdevstp.c
+
+
+AM_CFLAGS = $(GNUCFLAGS)
+INCLUDES = -I/usr/local/Headers///ijs -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/intl $(LIBGIMPPRINT_CFLAGS)
+LIBPRINTUT = $(top_builddir)/lib/libprintut.la
+LIBS = -L/usr/local/Libraries// -lijs -lz $(INTLLIBS)
+
+IJS_BIN = ijsgimpprint
+
+bin_PROGRAMS = $(IJS_BIN)
+
+EXTRA_PROGRAMS = ijsgimpprint
+
+ijsgimpprint_LDADD = $(LIBPRINTUT) $(LIBGIMPPRINT_LIBS)
+ijsgimpprint_DEPENDENCIES = $(LIBGIMPPRINT_LIBS)
+mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = contrib.mak.addon
+bin_PROGRAMS = $(IJS_BIN)
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I../..
+CPPFLAGS =
+LDFLAGS =
+ijsgimpprint_SOURCES = ijsgimpprint.c
+ijsgimpprint_OBJECTS = ijsgimpprint.$(OBJEXT)
+ijsgimpprint_LDFLAGS =
+CFLAGS = -g -O2
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README COPYING Makefile.am Makefile.in \
+contrib.mak.addon.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES = .deps/ijsgimpprint.P
+SOURCES = ijsgimpprint.c
+OBJECTS = ijsgimpprint.$(OBJEXT)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ghost/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+contrib.mak.addon: $(top_builddir)/config.status contrib.mak.addon.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+ijsgimpprint$(EXEEXT): $(ijsgimpprint_OBJECTS) $(ijsgimpprint_DEPENDENCIES)
+ @rm -f ijsgimpprint$(EXEEXT)
+ $(LINK) $(ijsgimpprint_LDFLAGS) $(ijsgimpprint_OBJECTS) $(ijsgimpprint_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/ghost
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/ghost/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) all-local
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-depend clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-tags distclean-depend distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-local all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+
+
+all-local: $(ALL_LOCAL_DEPS)
+
+$(srcdir)/gdevstp-print.h: $(top_srcdir)/include/gimp-print/gimp-print.h
+ sed $(GHCODE) $< > $(srcdir)/$@
+
+$(srcdir)/gdevstp-print-internal.h: $(top_srcdir)/src/main/gimp-print-internal.h
+ echo '#define VERSION "4.2.7"' > $(srcdir)/$@
+ echo '#define RELEASE_DATE "15 Jul 2004"' >> $(srcdir)/$@
+ sed $(GHCODE) $< >> $(srcdir)/$@
+
+$(srcdir)/gdevstp-print-intl-internal.h: $(top_srcdir)/include/gimp-print/gimp-print-intl-internal.h
+ sed $(GHCODE) $< > $(srcdir)/$@
+
+gdevstp-%.h: $(srcdir)/../main/%.h Makefile
+ cd $(srcdir) ; sed $(GHCODE) $< > $@
+
+gdevstp-printers.c: ../main/print-printers.c
+ sed $(GHCODE) $< > $@
+
+gdevstp-%: $(srcdir)/../main/print-% Makefile
+ cd $(srcdir) ; sed $(GHCODE) $< > $@
+
+../main/print-printers.c: ../printdef/printdef $(srcdir)/../main/printers.xml
+ ../printdef/printdef < $(srcdir)/../main/printers.xml > $(top_builddir)/src/main/print-printers.c
+
+printdefl.o: printdefy.o
+
+../printdef/printdef: $(addprefix ../printdef/, printdefl.l printdefy.y printdef.h)
+ cd ../printdef ; \
+ $(MAKE)
+
+$(LIBGIMPPRINT_LIBS):
+ cd ../main ; \
+ $(MAKE)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ghost/Makefile.am b/src/ghost/Makefile.am
index 9a34a59..a2e3e7c 100644
--- a/src/ghost/Makefile.am
+++ b/src/ghost/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.17 2001/10/17 12:12:07 rlk Exp $
+## $Id: Makefile.am,v 1.17.2.6 2002/06/05 23:52:05 rlk Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -27,9 +27,27 @@ MAINT_CHARSET = latin1
## Variables
-MAINCODE = canon.c color.c dither.c escp2.c lexmark.c pcl.c printers.c ps.c util.c weave.c dither-matrices.c
-
-MAINHEADERS = print.h print-internal.h print-intl-internal.h quickmatrix257.h ran.367.179.h ran.509.131.h
+MAINCODE = canon.c \
+ color.c \
+ dither.c \
+ escp2.c \
+ escp2-data.c \
+ lexmark.c \
+ pcl.c \
+ printers.c \
+ ps.c \
+ util.c \
+ weave.c \
+ dither-matrices.c
+
+MAINHEADERS = print.h \
+ print-internal.h \
+ print-intl-internal.h \
+ quickmatrix257.h \
+ ran.367.179.h \
+ ran.509.131.h \
+ print-dither.h \
+ print-escp2.h
MAINFILES = $(MAINCODE) $(MAINHEADERS)
@@ -44,13 +62,17 @@ endif
all-local: $(ALL_LOCAL_DEPS)
-GHCODE = -e 's/print-printers.c/gdevstp-printers.c/' -e 's/^\\\#include "\(gimp\-\)*\(.*\)\.h"$$/\\\#include "gdevstp-\2.h"/' -e 's/^\\\#include <gimp-print\/gimp-print\(.*\)\.h>$$/\\\#include "gdevstp-print\1.h"/'
+GHCODE = -e 's/print-printers.c/gdevstp-printers.c/' \
+ -e 's/^\\\#include "\(gimp\-\)*\(.*\)\.h"$$/\\\#include "gdevstp-\2.h"/' \
+ -e 's/^\\\#include <gimp-print\/gimp-print\(.*\)\.h>$$/\\\#include "gdevstp-print\1.h"/'
$(srcdir)/gdevstp-print.h: $(top_srcdir)/include/gimp-print/gimp-print.h
sed $(GHCODE) $< > $(srcdir)/$@
$(srcdir)/gdevstp-print-internal.h: $(top_srcdir)/src/main/gimp-print-internal.h
- sed $(GHCODE) $< > $(srcdir)/$@
+ echo '#define VERSION "@VERSION@"' > $(srcdir)/$@
+ echo '#define RELEASE_DATE "@RELEASE_DATE@"' >> $(srcdir)/$@
+ sed $(GHCODE) $< >> $(srcdir)/$@
$(srcdir)/gdevstp-print-intl-internal.h: $(top_srcdir)/include/gimp-print/gimp-print-intl-internal.h
sed $(GHCODE) $< > $(srcdir)/$@
@@ -89,8 +111,11 @@ CLEANFILES = \
$(srcdir)/gdevstp-weave.c \
$(srcdir)/gdevstp-canon.c \
$(srcdir)/gdevstp-dither.c \
+ $(srcdir)/gdevstp-print-dither.h \
$(srcdir)/gdevstp-dither-matrices.c \
$(srcdir)/gdevstp-escp2.c \
+ $(srcdir)/gdevstp-print-escp2.h \
+ $(srcdir)/gdevstp-escp2-data.c \
$(srcdir)/gdevstp-lexmark.c \
$(srcdir)/gdevstp-pcl.c \
$(srcdir)/gdevstp-ps.c
@@ -110,4 +135,26 @@ EXTRA_DIST = \
debian-patch \
debian-patch-stp \
devs.mak.addon-5.10 \
- gdevstp.c \
+ gdevstp.c
+
+## Variables
+
+AM_CFLAGS = $(GNUCFLAGS)
+INCLUDES = @IJS_CFLAGS@ @INCLUDES@ $(LIBGIMPPRINT_CFLAGS)
+LIBPRINTUT = $(top_builddir)/lib/libprintut.la
+LIBS = @IJS_LIBS@ @LIBS@ $(INTLLIBS)
+
+## Programs
+
+IJS_BIN = ijsgimpprint
+
+bin_PROGRAMS = @IJS_BIN@
+
+EXTRA_PROGRAMS = ijsgimpprint
+
+ijsgimpprint_LDADD = $(LIBPRINTUT) $(LIBGIMPPRINT_LIBS)
+ijsgimpprint_DEPENDENCIES = $(LIBGIMPPRINT_LIBS)
+
+$(LIBGIMPPRINT_LIBS):
+ cd ../main ; \
+ $(MAKE)
diff --git a/src/ghost/Makefile.in b/src/ghost/Makefile.in
new file mode 100644
index 0000000..18819dd
--- /dev/null
+++ b/src/ghost/Makefile.in
@@ -0,0 +1,508 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ALL_LINGUAS = @ALL_LINGUAS@
+AS = @AS@
+AWK = @AWK@
+BISON_PROG = @BISON_PROG@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CONVERT = @CONVERT@
+CUPS_BACKEND_BIN = @CUPS_BACKEND_BIN@
+CUPS_BIN = @CUPS_BIN@
+CUPS_CFLAGS = @CUPS_CFLAGS@
+CUPS_CONF = @CUPS_CONF@
+CUPS_CONFIG = @CUPS_CONFIG@
+CUPS_FILTER_BIN = @CUPS_FILTER_BIN@
+CUPS_INSTALL = @CUPS_INSTALL@
+CUPS_LIBS = @CUPS_LIBS@
+CUPS_MAN = @CUPS_MAN@
+CUPS_NOINST_BIN = @CUPS_NOINST_BIN@
+CUPS_PKG = @CUPS_PKG@
+CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
+DATADIRNAME = @DATADIRNAME@
+DB2HTML = @DB2HTML@
+DB2PDF = @DB2PDF@
+DB2PS = @DB2PS@
+DLLTOOL = @DLLTOOL@
+DVIPDF = @DVIPDF@
+DVIPS = @DVIPS@
+ECHO = @ECHO@
+ESCPUTIL_BIN = @ESCPUTIL_BIN@
+ESCPUTIL_MAN = @ESCPUTIL_MAN@
+EXEEXT = @EXEEXT@
+FOOMATIC_3_NOINST_BIN = @FOOMATIC_3_NOINST_BIN@
+FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@
+FOOMATIC_INSTALL = @FOOMATIC_INSTALL@
+FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@
+FOOMATIC_NOINST_BIN = @FOOMATIC_NOINST_BIN@
+FOOMATIC_OLDIDS_NOINST_BIN = @FOOMATIC_OLDIDS_NOINST_BIN@
+FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@
+GENCAT = @GENCAT@
+GIMPPRINT_BINARY_AGE = @GIMPPRINT_BINARY_AGE@
+GIMPPRINT_CFLAGS = @GIMPPRINT_CFLAGS@
+GIMPPRINT_CURRENT_INTERFACE = @GIMPPRINT_CURRENT_INTERFACE@
+GIMPPRINT_DEPLIBS = @GIMPPRINT_DEPLIBS@
+GIMPPRINT_INTERFACE_AGE = @GIMPPRINT_INTERFACE_AGE@
+GIMPPRINT_LIBS = @GIMPPRINT_LIBS@
+GIMPPRINT_MAJOR_VERSION = @GIMPPRINT_MAJOR_VERSION@
+GIMPPRINT_MICRO_VERSION = @GIMPPRINT_MICRO_VERSION@
+GIMPPRINT_MINOR_VERSION = @GIMPPRINT_MINOR_VERSION@
+GIMPPRINT_VERSION = @GIMPPRINT_VERSION@
+GIMPTOOL = @GIMPTOOL@
+GIMPTOOL_CHECK = @GIMPTOOL_CHECK@
+GIMP_BIN = @GIMP_BIN@
+GIMP_CFLAGS = @GIMP_CFLAGS@
+GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@
+GIMP_DATA_DIR = @GIMP_DATA_DIR@
+GIMP_LIBS = @GIMP_LIBS@
+GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@
+GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@
+GLIBC21 = @GLIBC21@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNUCFLAGS = @GNUCFLAGS@
+IJS_CFLAGS = @IJS_CFLAGS@
+IJS_CONFIG = @IJS_CONFIG@
+IJS_INSTALL = @IJS_INSTALL@
+IJS_LIBS = @IJS_LIBS@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LEX = @LEX@
+LIBGIMPPRINT_LIBS = @LIBGIMPPRINT_LIBS@
+LIBICONV = @LIBICONV@
+LIBM = @LIBM@
+LIBREADLINE_DEPS = @LIBREADLINE_DEPS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTALLOCA = @LTALLOCA@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@
+MAIN_BIN = @MAIN_BIN@
+MAIN_DAT = @MAIN_DAT@
+MAIN_MAN = @MAIN_MAN@
+MAIN_SCR = @MAIN_SCR@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PLUG_IN_PATH = @PLUG_IN_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PRINT_VASPRINTF = @PRINT_VASPRINTF@
+RANLIB = @RANLIB@
+RELEASE_DATE = @RELEASE_DATE@
+RM = @RM@
+SAMPLE_IMAGES = @SAMPLE_IMAGES@
+STRIP = @STRIP@
+TESTPATTERN_BIN = @TESTPATTERN_BIN@
+TEST_BIN = @TEST_BIN@
+TEXI2HTML = @TEXI2HTML@
+USER_GUIDE = @USER_GUIDE@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+YACC = @YACC@
+YACC_PROG = @YACC_PROG@
+cups_bindir = @cups_bindir@
+cups_conf_datadir = @cups_conf_datadir@
+cups_conf_serverbin = @cups_conf_serverbin@
+cups_conf_serverroot = @cups_conf_serverroot@
+cups_exec_prefix = @cups_exec_prefix@
+cups_prefix = @cups_prefix@
+gimp_plug_indir = @gimp_plug_indir@
+gimpprint_cflags = @gimpprint_cflags@
+gimpprint_libs = @gimpprint_libs@
+
+AUTOMAKE_OPTIONS = 1.4 gnu
+
+MAINT_CHARSET = latin1
+
+MAINCODE = canon.c color.c dither.c escp2.c escp2-data.c lexmark.c pcl.c printers.c ps.c util.c weave.c dither-matrices.c
+
+
+MAINHEADERS = print.h print-internal.h print-intl-internal.h quickmatrix257.h ran.367.179.h ran.509.131.h print-dither.h print-escp2.h
+
+
+MAINFILES = $(MAINCODE) $(MAINHEADERS)
+@BUILD_GHOST_TRUE@ALL_LOCAL_DEPS = $(srcdir)/$(addprefix gdevstp-,$(MAINCODE)) $(srcdir)/$(addprefix gdevstp-,$(MAINHEADERS))
+@BUILD_GHOST_FALSE@ALL_LOCAL_DEPS =
+
+GHCODE = -e 's/print-printers.c/gdevstp-printers.c/' -e 's/^\\\#include "\(gimp\-\)*\(.*\)\.h"$$/\\\#include "gdevstp-\2.h"/' -e 's/^\\\#include <gimp-print\/gimp-print\(.*\)\.h>$$/\\\#include "gdevstp-print\1.h"/'
+
+
+CLEANFILES = $(srcdir)/gdevstp-printers.c $(srcdir)/gdevstp-ran.367.179.h $(srcdir)/gdevstp-ran.509.131.h $(srcdir)/gdevstp-color.c $(srcdir)/gdevstp-print.h $(srcdir)/gdevstp-print-internal.h $(srcdir)/gdevstp-print-intl-internal.h $(srcdir)/gdevstp-quickmatrix257.h $(srcdir)/gdevstp-util.c $(srcdir)/gdevstp-weave.c $(srcdir)/gdevstp-canon.c $(srcdir)/gdevstp-dither.c $(srcdir)/gdevstp-print-dither.h $(srcdir)/gdevstp-dither-matrices.c $(srcdir)/gdevstp-escp2.c $(srcdir)/gdevstp-print-escp2.h $(srcdir)/gdevstp-escp2-data.c $(srcdir)/gdevstp-lexmark.c $(srcdir)/gdevstp-pcl.c $(srcdir)/gdevstp-ps.c
+
+
+# End of old compatability cruft
+
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = COPYING Makefile Makefile.am README README.bsd contrib.mak.addon.in contrib.mak.addon.old debian-patch debian-patch-stp devs.mak.addon-5.10 gdevstp.c
+
+
+AM_CFLAGS = $(GNUCFLAGS)
+INCLUDES = @IJS_CFLAGS@ @INCLUDES@ $(LIBGIMPPRINT_CFLAGS)
+LIBPRINTUT = $(top_builddir)/lib/libprintut.la
+LIBS = @IJS_LIBS@ @LIBS@ $(INTLLIBS)
+
+IJS_BIN = ijsgimpprint
+
+bin_PROGRAMS = @IJS_BIN@
+
+EXTRA_PROGRAMS = ijsgimpprint
+
+ijsgimpprint_LDADD = $(LIBPRINTUT) $(LIBGIMPPRINT_LIBS)
+ijsgimpprint_DEPENDENCIES = $(LIBGIMPPRINT_LIBS)
+mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = contrib.mak.addon
+bin_PROGRAMS = @IJS_BIN@
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+ijsgimpprint_SOURCES = ijsgimpprint.c
+ijsgimpprint_OBJECTS = ijsgimpprint.$(OBJEXT)
+ijsgimpprint_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README COPYING Makefile.am Makefile.in \
+contrib.mak.addon.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = ijsgimpprint.c
+OBJECTS = ijsgimpprint.$(OBJEXT)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/ghost/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+contrib.mak.addon: $(top_builddir)/config.status contrib.mak.addon.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+ijsgimpprint$(EXEEXT): $(ijsgimpprint_OBJECTS) $(ijsgimpprint_DEPENDENCIES)
+ @rm -f ijsgimpprint$(EXEEXT)
+ $(LINK) $(ijsgimpprint_LDFLAGS) $(ijsgimpprint_OBJECTS) $(ijsgimpprint_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/ghost
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ijsgimpprint.o: ijsgimpprint.c ../../config.h \
+ ../../include/gimp-print/gimp-print.h \
+ ../../include/gimp-print/gimp-print-intl-internal.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) all-local
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-local all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+@SET_MAKE@
+
+all-local: $(ALL_LOCAL_DEPS)
+
+$(srcdir)/gdevstp-print.h: $(top_srcdir)/include/gimp-print/gimp-print.h
+ sed $(GHCODE) $< > $(srcdir)/$@
+
+$(srcdir)/gdevstp-print-internal.h: $(top_srcdir)/src/main/gimp-print-internal.h
+ echo '#define VERSION "@VERSION@"' > $(srcdir)/$@
+ echo '#define RELEASE_DATE "@RELEASE_DATE@"' >> $(srcdir)/$@
+ sed $(GHCODE) $< >> $(srcdir)/$@
+
+$(srcdir)/gdevstp-print-intl-internal.h: $(top_srcdir)/include/gimp-print/gimp-print-intl-internal.h
+ sed $(GHCODE) $< > $(srcdir)/$@
+
+gdevstp-%.h: $(srcdir)/../main/%.h Makefile
+ cd $(srcdir) ; sed $(GHCODE) $< > $@
+
+gdevstp-printers.c: ../main/print-printers.c
+ sed $(GHCODE) $< > $@
+
+gdevstp-%: $(srcdir)/../main/print-% Makefile
+ cd $(srcdir) ; sed $(GHCODE) $< > $@
+
+../main/print-printers.c: ../printdef/printdef $(srcdir)/../main/printers.xml
+ ../printdef/printdef < $(srcdir)/../main/printers.xml > $(top_builddir)/src/main/print-printers.c
+
+printdefl.o: printdefy.o
+
+../printdef/printdef: $(addprefix ../printdef/, printdefl.l printdefy.y printdef.h)
+ cd ../printdef ; \
+ $(MAKE)
+
+$(LIBGIMPPRINT_LIBS):
+ cd ../main ; \
+ $(MAKE)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ghost/README b/src/ghost/README
index a9193b6..22e7f82 100644
--- a/src/ghost/README
+++ b/src/ghost/README
@@ -1,30 +1,61 @@
INTRODUCTION:
-------------
- Gimp-Print 4.2 includes an associated Ghostscript driver, which is
- named `stp'. That name originally referred to Epson Stylus Photo
- printers; this is the first Ghostscript driver which supported those
- printers with high quality. The same driver now supports many Canon,
- HP, and Lexmark printers.
-
- This driver works with GhostScript 5.10, 5.50, and 6.51. It should
- work with any later releases on the 6.5x GNU Ghostscript line, such
- as 6.52XS. Due to incompatibilities between the Aladdin Free Public
- License (AFPL) and the GNU General Public License (GPL), this driver
- may not be combined and distributed with versions of GhostScript not
- covered by the GPL. We will not fix bugs reported against
- combinations of this driver with AFPL-only versions of GhostScript.
+ Gimp-Print 4.2 includes an associated Ghostscript driver, which is
+ named `stp'. That name originally referred to Epson Stylus Photo
+ printers; this is the first Ghostscript driver which supported those
+ printers with high quality. The same driver now supports many Canon,
+ HP, and Lexmark printers.
+
+ This driver works with GhostScript 5.10, 5.50 and 6.51. It should
+ work with any later releases on the 6.5x GNU Ghostscript line, such
+ as 6.52. Due to incompatibilities between the Aladdin Free Public
+ License (AFPL) and the GNU General Public License (GPL), this driver
+ may not be combined and distributed with versions of GhostScript not
+ covered by the GPL. We will not fix bugs reported against
+ combinations of this driver with AFPL-only versions of GhostScript.
+
+ GNU Ghostscript 6.53 and 7.05 and ESP Ghostscript 7.05 contain a
+ version of the Gimp-Print driver based on the Gimp-Print 4.2.0
+ release with a bug fix. Building Gimp-Print is much simpler with
+ Ghostscript 6.53 and 7.05 for that reason.
+
+ Gimp-Print includes another driver based on the new IJS protocol.
+ IJS is an initiative to improve the quality and ease of use of
+ printing with Ghostscript. It permits adding or upgrading drivers
+ without recompiling Ghostscript. An IJS driver runs in a separate
+ process that communicates with Ghostscript via an IPC channel. The
+ Gimp-Print IJS driver may be used with AFPL Ghostscript, as it runs
+ in a separate process.
+
+ The original stp driver will not be maintained beyond Gimp-Print
+ 4.2; it will be phased out and replaced by the IJS driver
+ (ijsgimpprint). It currently has all of the capabilities of the stp
+ driver, but it is perhaps not as mature.
+
+ IJS support was incorporated into Ghostscript in GNU Ghostscript
+ 6.53 and AFPL Ghostscript 7.04, as IJS 0.32.
+
+ Finally, the distribution also includes a utility named "escputil"
+ that performs many utility functions, such as head cleaning, nozzle
+ alignment, and the like, for Epson Stylus printers. This is
+ normally compiled by "make" and installed by "make install".
AUTHOR:
-------
- This Ghostscript frontend was originally written by Henryk Richter
- (buggs@comlab.uni-rostock.de); it since has been fully integrated
- into gimp-print. Gimp-Print itself was originally written by Michael
- Sweet <mike@easysw.com>, who released up to version 2.0; Robert
- Krawitz released version 3.0. The gimp-print development team
- (http://gimp-print.sourceforge.net) now maintains the entire package.
+ The Ghostscript stp driver was originally written by Henryk Richter
+ (buggs@comlab.uni-rostock.de), and was integrated into Gimp-Print
+ during the 3.1 development series. Gimp-Print itself was originally
+ written by Michael Sweet <mike@easysw.com>, who released up to
+ version 2.0; Robert Krawitz released version 3.0. The gimp-print
+ development team (http://gimp-print.sourceforge.net) now maintains
+ the entire package.
+
+ The IJS driver was originally written by Russell Lang, and
+ incorporated into Gimp-Print in early 2002. This driver corresponds
+ with the IJS protocol 0.32.
LICENSE:
@@ -45,8 +76,41 @@ LICENSE:
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-BUILD AND INSTALLATION:
------ --- -------------
+BUILD AND INSTALLATION OF THE STP DRIVER:
+----- --- ------------ -- --- --- -------
+
+For GNU Ghostscript 6.53 and 7.05, and ESP Ghostscript 7.05
+(recommended):
+
+ Building Gimp-Print for GNU Ghostscript 6.53 and 7.05 and ESP
+ Ghostscript 7.05 is much simpler, as the driver is already in the
+ Ghostscript package. It is sufficient to build and install the
+ Gimp-Print library and Ghostscript.
+
+1) First build and install the core Gimp-Print library. Run
+
+ ./configure
+ make
+ make install
+
+ in the top level directory (../.. from here).
+
+ "make install" typically needs to be run as root. You may also
+ need to run "ldconfig" as root following "make install".
+
+ You may optionally run
+
+ ./configure --without-gimp
+
+ if you do not wish to build the Gimp Print plugin.
+
+2) In the Ghostscript source directory, run
+
+ ./configure --with-gimp-print
+ make
+ make install
+
+For Ghostscript 5.10, 5.50, 6.51, or 6.52:
1) Get a recent Ghostscript (5.10, 5.50, or 6.51 or its successors)
and prepare the sources as described in the documentation (don`t
@@ -153,10 +217,64 @@ BUILD AND INSTALLATION:
driver named "stp". Check this by calling "gs -h" with the newly
compiled Ghostscript.
-The distribution includes a utility named "escputil" that performs
-many utility functions, such as head cleaning, nozzle alignment, and
-the like, for Epson Stylus printers. This is normally compiled by
-"make" and installed by "make install".
+
+BUILD AND INSTALLATION OF THE IJS GIMPPRINT DRIVER:
+----- --- ------------ -- --- --- --------- -------
+
+ GNU Ghostscript 6.53 and beyond, and AFPL Ghostscript 7.04 and
+ beyond, are required in order to use this driver. These
+ instructions correspond to GNU Ghostscript 6.53.
+
+ You must first build Ghostscript itself with support for the IJS
+ driver. This is done as follows, within the Ghostscript source
+ directory:
+
+ cd ghostscript-6.53
+ ./configure --with-ijs
+ make
+ make install
+
+ The Ghostscript installation (as of 6.53, and likely 7.04) does not
+ install certain files that are required to build the IJS driver.
+ This should be fixed in future Ghostscript releases. To build and
+ install these files, you need to have the "aclocal", "autoconf",
+ and "automake" packages installed. These are not normally
+ installed by default on most Linux and UNIX systems. You may
+ install them from your distribution, or download them from
+ ftp.gnu.org. After these packages are installed, run:
+
+ cd ghostscript-6.53/ijs
+ autoconf
+ ./configure
+ make
+ make install
+
+ You will perhaps get error messages during the autoconf process.
+ The important point is that the configure works correctly. This
+ will install the necessary header files and libraries.
+
+ After the IJS core files and Ghostscript are installed, you can
+ build and install the IJS driver within the Gimp-Print package.
+ This is done as follows, within the Gimp-Print source directory:
+
+ ./configure --with-ijs
+ make
+ make install
+
+ or
+
+ ./configure --with-ijs --with-foomatic
+ make
+ make install
+
+ if you also want to have the Foomatic data for the IJS driver
+ (see the README file in the main directory of this package).
+
+ If you do not wish to build the Gimp Print plugin, you may run
+
+ ./configure --with-ijs --without-gimp
+
+ ./configure --with-ijs --with-foomatic --without-gimp
DEBIAN:
@@ -248,8 +366,8 @@ If you know how to fix this, please update this README.
OPTIONS:
--------
-Overview:
----------
+Overview for the STP Driver:
+-------- --- --- --- -------
Options for the stp driver are given in normal Ghostscript
manner. The resolution of the image calculated by Ghostscript is not
@@ -258,19 +376,58 @@ possible to specify "-r360" to gs and print the output in 1440x720
dpi (see below for driver parameter). The result is a somewhat faster
operation of the driver.
+The device name is "stp" (-sDEVICE=stp)
+
The driver will not permit use of invalid settings.
The options for this driver are very complex. We strongly recommend
use of a printer management system such as Foomatic rather than
-configuring a spooler manually with this driver.
+configuring a spooler manually with this driver. The driver name used
+by Foomatic is "gimp-print".
+
+Overview for the IJS Driver:
+-------- --- --- --- -------
+
+Most options for the ijsgimpprint driver are similar to those for the
+stp driver. The major difference is that most of the Gimp-Print
+specific options are bundled together into a single option that is
+passed in as a special "-sIjsParams" parameter, and the normal
+Ghostscript "-s" and "-d" flags, indicating whether an option is a
+string or a number, are not used in this special parameter.
+
+The device name is "ijs" (-sDEVICE=ijs). In addition, the location of
+the driver program must be specified. This will typically be
+/usr/local/bin/ijsgimpprint; the parameter in this case is
+-sIjsServer=/usr/local/bin/ijsgimpprint .
+
+Also, -dIjsUseOutputFD should be specified whenever output from
+Ghostscript will go to stdout or into a pipe. It may be specified in
+all other cases, with only a slight performance degradation.
+
+The -sIjsParams parameter contains a single string containing a
+comma-separated list of sub-options:
+
+-sIjsParams=Option1=Value1,Option2=Value2
+
+and so forth.
+
+The options for this driver are very complex. We strongly recommend
+use of a printer management system such as Foomatic rather than
+configuring a spooler manually with this driver. The driver name used
+by Foomatic is "gimp-print-ijs".
Printer Model Selection:
------- ----- ----------
--sModel=name
+STP: -sModel=name
+IJS: -sDeviceManufacturer=vendor -sDeviceModel=name
-This option must be supplied. There is no default.
+This option must be supplied. There is no default. The IJS driver
+requires the vendor (it's part of the protocol), but the ijsgimpprint
+driver ignores it. It should be CANON, EPSON, LEXMARK, or
+HEWLETT-PACKARD. The value of the -sDeviceModel parameter is the same
+as the value of the -sModel parameter in the stp driver.
bjc-30 CANON BJC 30
bjc-50 CANON BJC 50
@@ -287,9 +444,12 @@ bjc-4300 CANON BJC 4300
bjc-4400 CANON BJC 4400 photo
bjc-6000 CANON BJC 6000
bjc-6100 CANON BJC 6100
+bjc-6200 CANON BJC 6200
+bjc-6500 CANON BJC 6500
bjc-7000 CANON BJC 7000
bjc-7100 CANON BJC 7100
bjc-8200 CANON BJC 8200
+bjc-s200 CANON S200
bjc-s400 CANON S400
bjc-s450 CANON S450
bjc-s800 CANON S800
@@ -298,9 +458,23 @@ escp2-c20sx EPSON Stylus C20SX
escp2-c20ux EPSON Stylus C20UX
escp2-c40sx EPSON Stylus C40SX
escp2-c40ux EPSON Stylus C40UX
+escp2-c41sx EPSON Stylus C41SX
+escp2-c41ux EPSON Stylus C41UX
+escp2-c42sx EPSON Stylus C42SX
+escp2-c42ux EPSON Stylus C42UX
+escp2-c43sx EPSON Stylus C43SX
+escp2-c43ux EPSON Stylus C43UX
+escp2-c44sx EPSON Stylus C44SX
+escp2-c44ux EPSON Stylus C44UX
+escp2-c50 EPSON Stylus C50
escp2-c60 EPSON Stylus C60
+escp2-c61 EPSON Stylus C61
+escp2-c62 EPSON Stylus C62
escp2-c70 EPSON Stylus C70
escp2-c80 EPSON Stylus C80
+escp2-c82 EPSON Stylus C82
+escp2-c83 EPSON Stylus C83
+escp2-c84 EPSON Stylus C84
escp2 EPSON Stylus Color
escp2-pro EPSON Stylus Color Pro
escp2-pro-xl EPSON Stylus Color Pro XL
@@ -332,6 +506,7 @@ escp2-3000 EPSON Stylus Color 3000
escp2-photo EPSON Stylus Photo
escp2-700 EPSON Stylus Photo 700
escp2-ex EPSON Stylus Photo EX
+escp2-ex3 EPSON Stylus Photo EX3
escp2-720 EPSON Stylus Photo 720
escp2-750 EPSON Stylus Photo 750
escp2-780 EPSON Stylus Photo 780
@@ -339,24 +514,84 @@ escp2-785 EPSON Stylus Photo 785EPX
escp2-790 EPSON Stylus Photo 790
escp2-810 EPSON Stylus Photo 810
escp2-820 EPSON Stylus Photo 820
+escp2-825 EPSON Stylus Photo 825
+escp2-830 EPSON Stylus Photo 830
escp2-870 EPSON Stylus Photo 870
escp2-875 EPSON Stylus Photo 875
escp2-890 EPSON Stylus Photo 890
escp2-895 EPSON Stylus Photo 895
+escp2-ph900 EPSON Stylus Photo 900
+escp2-915 EPSON Stylus Photo 915
+escp2-925 EPSON Stylus Photo 925
+escp2-950 EPSON Stylus Photo 950
+escp2-960 EPSON Stylus Photo 960
escp2-1200 EPSON Stylus Photo 1200
escp2-1270 EPSON Stylus Photo 1270
escp2-1280 EPSON Stylus Photo 1280
escp2-1290 EPSON Stylus Photo 1290
escp2-2000 EPSON Stylus Photo 2000P
+escp2-2100 EPSON Stylus Photo 2100
+escp2-2200 EPSON Stylus Photo 2200
escp2-5000 EPSON Stylus Pro 5000
escp2-5500 EPSON Stylus Pro 5500
escp2-7000 EPSON Stylus Pro 7000
escp2-7500 EPSON Stylus Pro 7500
+escp2-7600 EPSON Stylus Pro 7600
escp2-9000 EPSON Stylus Pro 9000
escp2-9500 EPSON Stylus Pro 9500
+escp2-9600 EPSON Stylus Pro 9600
escp2-10000 EPSON Stylus Pro 10000
escp2-scan2000 EPSON Stylus Scan 2000
escp2-scan2500 EPSON Stylus Scan 2500
+escp2-cx3200 EPSON Stylus CX-3200
+escp2-cx5200 EPSON Stylus CX-5200
+escp2-cl700 EPSON CL-700
+escp2-cl750 EPSON CL-750
+escp2-em900c EPSON EM-900C
+escp2-em930c EPSON EM-930C
+escp2-mc10000 EPSON MC-10000
+escp2-mc2000 EPSON MC-2000
+escp2-mc5000 EPSON MC-5000
+escp2-mc7000 EPSON MC-7000
+escp2-mc9000 EPSON MC-9000
+escp2-mj930c EPSON MJ-930C
+escp2-mj5100c EPSON MJ-5100C
+escp2-mj6000c EPSON MJ-6000C
+escp2-mj8000c EPSON MJ-8000C
+escp2-pm10000 EPSON PM-10000
+escp2-pm2000c EPSON PM-2000C
+escp2-pm2200c EPSON PM-2200C
+escp2-pm3000c EPSON PM-3000C
+escp2-pm3300c EPSON PM-3300C
+escp2-pm3500c EPSON PM-3500C
+escp2-pm4000px EPSON PM-4000PX
+escp2-pm5000c EPSON PM-5000C
+escp2-pm7000c EPSON PM-7000C
+escp2-pm700c EPSON PM-700C
+escp2-pm730c EPSON PM-730C
+escp2-pm750c EPSON PM-750C
+escp2-pm760c EPSON PM-760C
+escp2-pm770c EPSON PM-770C
+escp2-pm780c EPSON PM-780C
+escp2-pm790pt EPSON PM-790PT
+escp2-pm800c EPSON PM-800C
+escp2-pm850pt EPSON PM-850PT
+escp2-pm880c EPSON PM-880C
+escp2-pm9000c EPSON PM-9000C
+escp2-pm950c EPSON PM-950C
+escp2-pm970c EPSON PM-970C
+escp2-px7000 EPSON PX-7000
+escp2-px9000 EPSON PX-9000
+pcl-desnj-230 HP DesignJet 230
+pcl-desnj-250 HP DesignJet 250
+pcl-desnj-430 HP DesignJet 430
+pcl-desnj-450 HP DesignJet 450
+pcl-desnj-455 HP DesignJet 455
+pcl-desnj-488 HP DesignJet 488
+pcl-desnj-700 HP DesignJet 700
+pcl-750 HP DesignJet 750C
+pcl-desnj-2500 HP DesignJet 2500
+pcl-desnj-3500 HP DesignJet 3500
pcl-340 HP DeskJet 340
pcl-400 HP DeskJet 400
pcl-500 HP DeskJet 500
@@ -368,7 +603,6 @@ pcl-560 HP DeskJet 560C
pcl-600 HP DeskJet 600/600C (Single Cartridge)
pcl-601 HP DeskJet 600 series (2 Cartridge)
pcl-690 HP DeskJet 690 series (Photo-Ink capable)
-pcl-750 HP DesignJet 750
pcl-810 HP DeskJet 810C
pcl-812 HP DeskJet 812C
pcl-840 HP DeskJet 840C
@@ -392,6 +626,7 @@ pcl-2500 HP DeskJet 2500 series
pcl-2 HP LaserJet II series
pcl-3 HP LaserJet III series
pcl-4 HP LaserJet 4 series
+pcl-4l HP LaserJet 4L
pcl-4v HP LaserJet 4V, 4Si
pcl-5 HP LaserJet 5 series
pcl-5si HP LaserJet 5Si
@@ -400,6 +635,7 @@ lexmark-4076 Lexmark 4076 (PCL printer)
lexmark-z42 Lexmark Z42
lexmark-z43 Lexmark Z43
lexmark-z52 Lexmark Z52
+lexmark-z53 Lexmark Z53
Most or all of the Epson Stylus printers are fully functional. The
others vary. In particular, all of the listed Epson Stylus Photo
@@ -411,7 +647,8 @@ than for others.
Print Resolution Selection:
----- ---------- ----------
--sQuality=quality
+STP: -sQuality=quality
+IJS: -sIjsParams=Quality=quality
The meaning of this is model-specific. Two names are listed for each
resolution; the first (short) name is the value that must be passed to
@@ -436,7 +673,7 @@ perform more passes, printing fewer dots with each pass over the same
line and using different nozzles for each pass. This reduces banding
effects, but requires more time.
-"Microweave" modes use algorithms within the printer to generate the
+"Interleave" modes use algorithms within the printer to generate the
sequence of rows printed. These algorithms generally only work well
at low printing resolutions. Many printers do not support this kind
of printing at resolutions of 720 DPI and above, and some printers
@@ -453,21 +690,21 @@ purposes:
360x120 banded and not very dark).
180 Economy draft output on plain paper (output will not be very
- dark).
+ dark).
360x180 Draft output on plain paper (output will not be solidly
360x240 black); economy draft output on good quality inkjet paper.
360 Standard quality output on plain paper (output will be
- solidly black); draft output on good quality inkjet paper.
+ solidly black); draft output on good quality inkjet paper.
720x360 High quality output on plain paper; standard output on good
- quality inkjet paper.
+ quality inkjet paper.
720 Maximum quality on plain paper; high quality on good inkjet
- paper; proofs on photo-quality paper. On many printers,
- there will be little difference between this and 720x360 on
- plain paper.
+ paper; proofs on photo-quality paper. On many printers,
+ there will be little difference between this and 720x360 on
+ plain paper.
1440x720 High quality on photo paper; use 1440x720 Highest Quality to
reduce microbanding if needed. While this will work on plain
@@ -517,26 +754,26 @@ see the notes at the end of this section.
360dpi 360 DPI (6)
360uni 360 DPI Unidirectional (6)
-360mw 360 DPI Microweave (6, *)
-360mwuni 360 DPI Microweave Unidirectional (6)
-360sw 360 DPI (7, *)
-360swuni 360 DPI Unidirectional (7)
-360hq 360 DPI High Quality (7, 8)
-360hquni 360 DPI High Quality Unidirectional (7, 8)
+360mw 360 DPI Interleave (6, *)
+360mwuni 360 DPI Interleave Unidirectional (6)
+360sw 360 DPI (7, 17, *)
+360swuni 360 DPI Unidirectional (7, 17)
+360hq 360 DPI High Quality (7, 8, 17)
+360hquni 360 DPI High Quality Unidirectional (7, 8, 17)
720x360sw 720 x 360 DPI (9, 10)
720x360swuni 720 x 360 DPI Unidirectional (9, 10)
-720mw 720 DPI Microweave (11)
-720mwuni 720 DPI Microweave Unidirectional (11)
+720mw 720 DPI Interleave (11)
+720mwuni 720 DPI Interleave Unidirectional (11)
720sw 720 DPI (9)
720swuni 720 DPI Unidirectional (9)
720hq 720 DPI High Quality (9)
720hquni 720 DPI High Quality Unidirectional (9)
720hq2 720 DPI Highest Quality (9)
-1440x720mw 1440 x 720 DPI Microweave (12)
-1440x720mwuni 1440 x 720 DPI Microweave Unidirectional (12)
+1440x720mw 1440 x 720 DPI Interleave (12)
+1440x720mwuni 1440 x 720 DPI Interleave Unidirectional (12)
1440x720sw 1440 x 720 DPI (13)
1440x720swuni 1440 x 720 DPI Unidirectional (13, 14)
1440x720hq 1440 x 720 DPI Highest Quality (13)
@@ -544,10 +781,10 @@ see the notes at the end of this section.
2880x720sw 2880 x 720 DPI (15)
2880x720swuni 2880 x 720 DPI Unidirectional (15)
-1440x1440sw 1440 x 1440 DPI (16)
-1440x1440hq2 1440 x 1440 DPI Highest Quality (16)
+1440x1440sw 1440 x 1440 DPI (16)
+1440x1440hq2 1440 x 1440 DPI Highest Quality (16)
-2880x1440sw 2880 x 1440 DPI (16)
+2880x1440sw 2880 x 1440 DPI (16)
(*) This resolution is the default on all printers supporting this
setting.
@@ -557,26 +794,28 @@ see the notes at the end of this section.
660, 670, and 1500, and Stylus Photo, Stylus Photo 700, 720, and
EX.
-(2) Works on printers most that have a basic vertical spacing of 1/90,
+(2) Works on most printers that have a basic vertical spacing of 1/90,
1/180, or 1/360 inch. This includes Stylus Color, Stylus Color
440, 460, 600, 640, 660, 670, 800, 850, 900, 980, 1500, 1520,
3000, and Stylus Photo, Stylus Photo 700, 720 and EX.
-(3) Works on Stylus C70 and C80.
+(3) Works on Stylus C70, C80, and C82; and Stylus Photo 950, 960,
+ 2100, and 2200.
(4) Works on older printers with dot spacing of 1/120 inch. This
includes the Stylus Color Pro, Pro XL, 400, and 500.
(5) Works on newer printers with dot spacing of 1/120 inch. This
- includes the Stylus C20, C40, and C60, the Stylus Color 480, 580,
- 680, 740, 760, 777, 860, 880, 83, and 1160, and the Stylus Photo
- 750, 780, 785, 790, 810, 820, 870, 875, 890, 895, 1270, 1280,
- 1290, and 2000P, and the Stylus Scan 2000.
+ includes the Stylus C20, C40, C41, C42, C60, C61, and C62; the
+ Stylus Color 480, 580, 680, 740, 760, 777, 860, 880, 83, and 1160,
+ and the Stylus Photo 750, 780, 785, 790, 810, 820, 830, 870, 875,
+ 890, 895, 915, 925, 1270, 1280, 1290, and 2000P, and the Stylus
+ Scan 2000 and 2500.
(6) Works on all printers that do not support variable drop sizes.
This includes the Stylus Color, Stylus Color 400, 440, 460, 500,
- 600, 640, 660, 800, 850, 1500, 1520, and 3000, and Stylus Color
- Pro, and Stylus Photo, Stylus Photo 700, and EX.
+ 600, 640, 660, 800, 850, 1500, 1520, and 3000, Stylus Color Pro,
+ Stylus Color Pro XL, and Stylus Photo, Stylus Photo 700, and EX.
(7) Works on all printers that do support variable drop sizes. This
includes all supported Epson Stylus printers except for those
@@ -613,59 +852,100 @@ see the notes at the end of this section.
the Stylus Color 900.
(15) Works on all printers that support 2880x720 DPI. This includes
- the Stylus C60, C70, and C80, the Stylus Color 680, 777, 880, 83,
- and 980, and Stylus Photo 780, 790, 810, 820, 890, 1280, and 1290.
-
-(16) Works on Stylus C70 and Stylus C80. These resolutions are not
- supported by Epson and may not work on all C70 or C80 printers.
-
-
-The Stylus Pro printers (Stylus Pro 5000, 5500, 7000, 7500, 9000,
-9500, and 10000) support additional microweave modes known as Full
-Overlap (FOL), Four Pass, and FOL2. The Stylus Pro 5500, 7500, 9500,
-and 10000 additionally have a mode called MW2. These modes can only
-be used at certain resolutions. Stylus Pro printers support the
+ the Stylus C60, C61, C62, C70, C80, and C82, the Stylus Color 680,
+ 777, 880, 83, and 980, and Stylus Photo 780, 790, 810, 820, 830,
+ 890, 915, 925, 950, 960, 1280, and 1290. This resolution is
+ offered on the Stylus Photo 2100 and 2200, but may not work
+ correctly.
+
+(16) Works on Epson Stylus Photo 830, 925, 950, 960, 2100, 2200;
+ Stylus C61, C62, C70, C80, C82 ; Stylus Pro 7600 and 9600. This
+ resolution is not supported by Epson on the C70 and C80, but it
+ works correctly on at least some such printers.
+
+(17) These resolutions print at particularly high speed on the Epson
+ Stylus Photo 950, 960, 2100, and 2200 when printing in Four Color
+ Standard or Three Color Composite modes, or when printing in
+ monochrome or grayscale with any ink type other than Two Level
+ Grayscale, Seven Color Photo, or Quadtone.
+
+
+The Stylus Pro printers (Stylus Pro 5000, 5500, 7000, 7500, 7600,
+9000, 9500, 9600, and 10000) support additional interleave modes known
+as Full Overlap (FOL), Four Pass, and FOL2. The Stylus Pro 5500,
+7500, 7600, 9500, 9600, and 10000 additionally have a mode called MW2.
+These modes can only be used at certain resolutions. Stylus Pro
+printers support the following resolutions:
+
+180dpi 180 DPI
+
+360dpi 360 DPI
+360uni 360 DPI Unidirectional
+360mw 360 DPI Interleave
+360mwuni 360 DPI Interleave Unidirectional
+360fol 360 DPI Full Overlap
+360foluni 360 DPI Full Overlap Unidirectional
+360fol2 360 DPI FOL2
+360fol2uni 360 DPI FOL2 Unidirectional
+360mw2 360 DPI MW2
+360mw2uni 360 DPI MW2 Unidirectional
+
+720x360dpi 720 x 360 DPI
+720x360uni 720 x 360 DPI Unidirectional
+720x360fol 720 x 360 DPI FOL
+720x360foluni 720 x 360 DPI FOL Unidirectional
+720x360fol2 720 x 360 DPI FOL2
+720x360fol2uni 720 x 360 DPI FOL2 Unidirectional
+720x360mw2 720 x 360 DPI MW2
+720x360mw2uni 720 x 360 DPI MW2 Unidirectional
+
+720dpi 720 DPI
+720uni 720 DPI Unidirectional
+720mw 720 DPI Interleave
+720mwuni 720 DPI Interleave Unidirectional
+720fol 720 DPI Full Overlap
+720foluni 720 DPI Full Overlap Unidirectional
+720fourp 720 DPI Four Pass
+720fourpuni 720 DPI Four Pass Unidirectional
+
+1440x720dpi 1440 x 720 DPI
+1440x720uni 1440 x 720 DPI Unidirectional
+1440x720mw 1440 x 720 DPI Interleave
+1440x720mwuni 1440 x 720 DPI Interleave Unidirectional
+1440x720fol 1440 x 720 DPI FOL
+1440x720foluni 1440 x 720 DPI FOL Unidirectional
+1440x720fourp 1440 x 720 DPI Four Pass
+1440x720fourpuni 1440 x 720 DPI Four Pass Unidirectional
+
+In addition, the Stylus Pro 7600 and 9600 printers support the
following resolutions:
-180dpi 180 DPI
-
-360dpi 360 DPI
-360uni 360 DPI Unidirectional
-360mw 360 DPI Microweave
-360mwuni 360 DPI Microweave Unidirectional
-360fol 360 DPI Full Overlap
-360foluni 360 DPI Full Overlap Unidirectional
-360fol2 360 DPI FOL2
-360fol2uni 360 DPI FOL2 Unidirectional
-360mw2 360 DPI MW2
-360mw2uni 360 DPI MW2 Unidirectional
-
-720x360dpi 720 x 360 DPI
-720x360uni 720 x 360 DPI Unidirectional
-720x360fol 720 x 360 DPI FOL
-720x360foluni 720 x 360 DPI FOL Unidirectional
-720x360fol2 720 x 360 DPI FOL2
-720x360fol2uni 720 x 360 DPI FOL2 Unidirectional
-720x360mw2 720 x 360 DPI MW2
-720x360mw2uni 720 x 360 DPI MW2 Unidirectional
-
-720dpi 720 DPI
-720uni 720 DPI Unidirectional
-720mw 720 DPI Microweave
-720mwuni 720 DPI Microweave Unidirectional
-720fol 720 DPI Full Overlap
-720foluni 720 DPI Full Overlap Unidirectional
-720fourp 720 DPI Four Pass
-720fourpuni 720 DPI Four Pass Unidirectional
-
-1440x720dpi 1440 x 720 DPI
-1440x720uni 1440 x 720 DPI Unidirectional
-1440x720mw 1440 x 720 DPI Microweave
-1440x720mwuni 1440 x 720 DPI Microweave Unidirectional
-1440x720fol 1440 x 720 DPI FOL
-1440x720foluni 1440 x 720 DPI FOL Unidirectional
-1440x720fourp 1440 x 720 DPI Four Pass
-1440x720fourpuni 1440 x 720 DPI Four Pass Unidirectional
+2880x720dpi 2880 x 720 DPI
+2880x720uni 2880 x 720 DPI Unidirectional
+2880x720mw 2880 x 720 DPI Interleave
+2880x720mwuni 2880 x 720 DPI Interleave Unidirectional
+2880x720fol 2880 x 720 DPI FOL
+2880x720foluni 2880 x 720 DPI FOL Unidirectional
+2880x720fourp 2880 x 720 DPI Four Pass
+2880x720fourpuni 2880 x 720 DPI Four Pass Unidirectional
+
+1440x1440dpi 1440 x 1440 DPI
+1440x1440uni 1440 x 1440 DPI Unidirectional
+1440x1440mw 1440 x 1440 DPI Interleave
+1440x1440mwuni 1440 x 1440 DPI Interleave Unidirectional
+1440x1440fol 1440 x 1440 DPI FOL
+1440x1440foluni 1440 x 1440 DPI FOL Unidirectional
+1440x1440fourp 1440 x 1440 DPI Four Pass
+1440x1440fourpuni 1440 x 1440 DPI Four Pass Unidirectional
+
+2880x1440dpi 2880 x 1440 DPI
+2880x1440uni 2880 x 1440 DPI Unidirectional
+2880x1440mw 2880 x 1440 DPI Interleave
+2880x1440mwuni 2880 x 1440 DPI Interleave Unidirectional
+2880x1440fol 2880 x 1440 DPI FOL
+2880x1440foluni 2880 x 1440 DPI FOL Unidirectional
+2880x1440fourp 2880 x 1440 DPI Four Pass
+2880x1440fourpuni 2880 x 1440 DPI Four Pass Unidirectional
For PCL printers (including Hewlett-Packard and Lexmark 4076):
@@ -700,24 +980,26 @@ For Lexmark printers other than the 4076:
For Canon printers:
-1200 DPI printers (BJC 7000, BJC 7100, BJC 8200, BJC 8500):
+1200 DPI printers (BJC 7000, BJC 7100, BJC 8500):
-300dpi 300x300 DPI
-300dmt 300x300 DPI DMT
-600dpi 600x600 DPI
-600dmt 600x600 DPI DMT
+300x300dpi 300x300 DPI
+300x300dmt 300x300 DPI DMT
+600x600dpi 600x600 DPI
+600x600dmt 600x600 DPI DMT
1200x600dpi 1200x600 DPI
-1200dpi 1200x1200 DPI
+1200x1200dpi 1200x1200 DPI
-1440 DPI printers (BJC 1000, BJC 2000, BJC 3000, BJC 4300, BJC 4400,
- BJC 5100, BJC 5500, BJC 6000, BJC 6100, BJC 6500, BJC 8200):
+1440 DPI printers (BJC 30, BJC 50, BJC 55, BJC 80, BJC 85, BJC 210,
+ BJC 240, BJC 250, BJC 1000, BJC 2000, BJC 3000, BJC 4300, BJC
+ 4400, BJC 6000, BJC 6100, BJC 6200, BJC 6500, BJC 8200, S400,
+ S450, S800, S4500):
-360dpi 360x360 DPI
-360dmt 360x360 DPI DMT
+360x360dpi 360x360 DPI
+360x360dmt 360x360 DPI DMT
720x360dpi 720x360 DPI
-720dpi 720x720 DPI
+720x720dpi 720x720 DPI
1440x720dpi 1440x720 DPI
-1440dpi 1440x1440 DPI
+1440x1440dpi 1440x1440 DPI
Ink Types
@@ -729,7 +1011,8 @@ resolution; the first (short) name is the value that must be passed to
-sInkType, and the second (long) name is descriptive. Not all ink
types are supported on all printers.
--sInkType=inktype
+STP: -sInkType=inktype
+IJS: -sIjsParams=InkType=inktype
For Epson and Lexmark (other than the 4076) printers:
@@ -747,17 +1030,17 @@ mixing black ink in. The Epson Stylus Color 1500 cannot mix black ink
with colored inks; on this printer, Three Color Composite must be
used.
-As of this writing (September 2001), no seven color printers are sold
-in North America. When such a printer is sold, the Seven Color
-Enhanced and Six Color Enhanced Composite modes will utilize all of
-these inks.
-
-Photo7 Seven Color Enhanced
-PhotoEnhance Six Color Enhanced Composite
+Photo7 Seven Color Photo (CcMmYKk, for the Epson Stylus
+ Photo 2100 and 2200, and Stylus Pro 7600 and 9600)
PhotoCMYK Six Color Photo
PhotoCMY Five Color Photo Composite
CMYK Four Color Standard
RGB Three Color Composite
+Quadtone Quadtone grayscale inks (special third party inksets
+ designed to produce superior results for grayscale
+ images)
+Gray2 Two Level Grayscale (Kk, for the Epson stylus Photo
+ 2100 and 2200, and Stylus Pro 7600 and 9600)
For Canon printers:
@@ -786,7 +1069,8 @@ Two names are listed for each resolution; the first (short) name is
the value that must be passed to -sMediaType, and the second (long) name
is descriptive.
--sMediaType=mediatype
+STP: -sMediaType=mediatype
+IJS: -sIjsParams=MediaType=mediatype
For Epson and Lexmark (other than the 4076) inkjet printers:
@@ -850,13 +1134,42 @@ Media Sources
This is printer type specific. The option names are case sensitive.
--sInputSlot=mediasource
+STP: -sInputSlot=mediasource
+IJS: -sIjsParams=MediaSource=mediasource
+
+Epson printers without a roll feed mechanism should not have this
+option set.
+
+For Epson printers with a roll feed mechanism without a paper cutter
+(Stylus Photo 785, 825, 870, 875, 890, 895, 915, 1200, 1270, 1280,
+1290):
+
+Standard Standard
+Roll Roll Feed
-For Epson printers:
+For Epson printers with a roll feed mechanism with a paper cutter
+(Stylus Photo 925, 950, 960, 2100, 2200):
Standard Standard
-Roll Roll Feed (for certain Stylus Photo and Stylus
- Pro models only)
+RollCutPage Roll feed, cut each page
+RollCutNone Roll feed, do not cut
+
+NOTE: The -sInputSlot=RollCutPage does not work with the STP driver,
+only with the IJS driver.
+
+For Epson Stylus Pro printers without a roll feed mechanism (Stylus
+Pro 5000, 5500):
+
+CutSheet1 Cut sheet bin 1
+CutSheet2 Cut sheet bin 2
+CutSheetAuto Cut sheet autoselect
+ManualSelect Manual selection
+
+For Epson Stylus Pro printers with a roll feed mechanism (Stylus Pro
+7000, 7500, 7600, 9000, 9500, 9600, 10000, 10600):
+
+Standard Standard
+Roll Roll Feed
For Canon printers:
@@ -896,43 +1209,50 @@ Media Sizes
This is printer-specific; we cannot list the correct values for each
printer here. The option names are case-sensitive. Two names are
listed for each resolution; the first (short) name is the value that
-must be passed to -sPaperSize, and the second (long) name is
+must be passed to -sPAPERSIZE, and the second (long) name is
descriptive. This option does not set GhostScript up to use a paper
size other than the default; it only tells the driver to set up the
printer for a different paper size. The default paper size is
'Letter'.
--sPaperSize=papersize
+STP: -sPAPERSIZE=papersize
+IJS: -sPAPERSIZE=papersize (for known Ghostscript paper sizes)
+ or
+ -dDEVICEWIDTHPOINTS=x -dDEVICEHEIGHTPOINTS=y
+ where x and y are the width and height of the paper
+ respectively, in points (1/72")
+
* Common English paper sizes
-Letter Letter 8.5in x 11in
-Legal Legal 8.5in x 14in
-Tabloid Tabloid 11in x 17in
-Executive Executive 7.25in x 10.5in
-Postcard Postcard 100mm x 147mm
-w216h360 3x5
-w288h432 4x6
-w324h495 Epson 4x6 Photo Paper
-w360h504 5x7
-w360h576 5x8
-8x10 8x10
-Statement Manual 5.5in x 8.5in
-TabloidExtra 12x18
-SuperB 13x19
+Letter Letter 8.5in x 11in x=612, y=792
+Legal Legal 8.5in x 14in x=612, y=1008
+Tabloid Tabloid 11in x 17in x=792, y=1224
+Executive Executive 7.25in x 10.5in x=522, y=756
+Postcard Postcard 100mm x 147mm x=283, y=416
+w216h360 3x5 x=216, y=360
+w288h432 4x6 x=288, y=432
+w324h495 Epson 4x6 Photo Paper x=324, y=495
+w360h504 5x7 x=360, y=504
+w360h576 5x8 x=360, y=576
+8x10 8x10 x=576, y=720
+Statement Manual 5.5in x 8.5in x=396, y=612
+TabloidExtra 12x18 x=864, y=1296
+SuperB 13x19 x=936, y=1368
* Common photographic paper sizes
-w576h864 8x12 Sometimes used for 35 mm
-w792h1008 11x14
-w1152h1440 16x20
-w1152h1728 16x24 20x24 for 35 mm
-w1440h1728 20x24
-w1440h2160 20x30 24x30 for 35 mm
-w1728h2160 24x30
-w1728h2592 24x36 Sometimes used for 35 mm
-w2160h2880 30x40
+w576h864 8x12 Sometimes used for 35 mm x=576, y=864
+w792h1008 11x14 x=792, y=1008
+w1152h1440 16x20 x=1152, y=1440
+w1152h1728 16x24 20x24 for 35 mm x=1152, y=1728
+w1440h1728 20x24 x=1440, y=1728
+w1440h2160 20x30 24x30 for 35 mm x=1440, y=2160
+w1584h2160 22x30 Common watercolor size x=1440, y=2160
+w1728h2160 24x30 x=1728, y=2160
+w1728h2592 24x36 Sometimes used for 35 mm x=1728, y=2592
+w2160h2880 30x40 x=2160, y=2880
International Paper Sizes (mostly taken from BS4000:1968)
@@ -943,123 +1263,128 @@ w2160h2880 30x40
* millimetre. Thus, A0 is 841mm x 1189mm. Every other A
* size is obtained by doubling or halving another A size.
-w4768h6749 4A 1682mm x 2378mm
-w3370h4768 2A 1189mm x 1682mm
-A0 A0 841mm x 1189mm
-A1 A1 594mm x 841mm
-A2 A2 420mm x 594mm
-A3 A3 297mm x 420mm
-A4 A4 210mm x 297mm
-A5 A5 148mm x 210mm
-A6 A6 105mm x 148mm
-A7 A7 74mm x 105mm
-A8 A8 52mm x 74mm
-A9 A9 37mm x 52mm
-A10 A10 26mm x 37mm
+w4768h6749 4A 1682mm x 2378mm x=4768, y=6749
+w3370h4768 2A 1189mm x 1682mm x=3370, y=4768
+A0 A0 841mm x 1189mm x=2384, y=3370
+A1 A1 594mm x 841mm x=1684, y=2384
+A2 A2 420mm x 594mm x=1191, y=1684
+A3 A3 297mm x 420mm x=842, y=1191
+A4 A4 210mm x 297mm x=595, y=842
+A5 A5 148mm x 210mm x=420, y=595
+A6 A6 105mm x 148mm x=297, y=420
+A7 A7 74mm x 105mm x=210, y=297
+A8 A8 52mm x 74mm x=148, y=210
+A9 A9 37mm x 52mm x=105, y=148
+A10 A10 26mm x 37mm x=73, y=105
* Stock sizes for normal trims.
* Allowance for trim is 3 millimetres.
-w2437h3458 RA0 860mm x 1220mm
-w1729h2437 RA1 610mm x 860mm
-w1218h1729 RA2 430mm x 610mm
-w864h1218 RA3 305mm x 430mm
-w609h864 RA4 215mm x 305mm
+w2437h3458 RA0 860mm x 1220mm x=2437, y=3458
+w1729h2437 RA1 610mm x 860mm x=1729, y=2437
+w1218h1729 RA2 430mm x 610mm x=1218, y=1729
+w864h1218 RA3 305mm x 430mm x=864, y=1218
+w609h864 RA4 215mm x 305mm x=609, y=864
* Stock sizes for bled work or extra trims.
-w2551h3628 SRA0 900mm x 1280mm
-w1814h2551 SRA1 640mm x 900mm
-w1275h1814 SRA2 450mm x 640mm
-w907h1275 SRA3 320mm x 450mm
-w637h907 SRA4 225mm x 320mm
+w2551h3628 SRA0 900mm x 1280mm x=2551, y=3628
+w1814h2551 SRA1 640mm x 900mm x=1814, y=2551
+w1275h1814 SRA2 450mm x 640mm x=1275, y=1814
+w907h1275 SRA3 320mm x 450mm x=907, y=1275
+w637h907 SRA4 225mm x 320mm x=637, y=907
* "B" series: Posters, wall charts and similar items.
-w5669h8016 4B ISO 2000mm x 2828mm
-w4008h5669 2B ISO 1414mm x 2000mm
-ISOB0 B0 ISO 1000mm x 1414mm
-ISOB1 B1 ISO 707mm x 1000mm
-ISOB2 B2 ISO 500mm x 707mm
-ISOB3 B3 ISO 353mm x 500mm
-ISOB4 B4 ISO 250mm x 353mm
-ISOB5 B5 ISO 176mm x 250mm
-ISOB6 B6 ISO 125mm x 176mm
-ISOB7 B7 ISO 88mm x 125mm
-ISOB8 B8 ISO 62mm x 88mm
-ISOB9 B9 ISO 44mm x 62mm
-ISOB10 B10 ISO 31mm x 44mm
-
-B0 B0 JIS
-B1 B1 JIS
-B2 B2 JIS
-B3 B3 JIS
-B4 B4 JIS
-B5 B5 JIS
-B6 B6 JIS
-B7 B7 JIS
-B8 B8 JIS
-B9 B9 JIS
-B10 B10 JIS
+w5669h8016 4B ISO 2000mm x 2828mm x=5669, y=8016
+w4008h5669 2B ISO 1414mm x 2000mm x=4008, y=5669
+ISOB0 B0 ISO 1000mm x 1414mm x=2834, y=4008
+ISOB1 B1 ISO 707mm x 1000mm x=2004, y=2834
+ISOB2 B2 ISO 500mm x 707mm x=1417, y=2004
+ISOB3 B3 ISO 353mm x 500mm x=1000, y=1417
+ISOB4 B4 ISO 250mm x 353mm x=708, y=1000
+ISOB5 B5 ISO 176mm x 250mm x=498, y=708
+ISOB6 B6 ISO 125mm x 176mm x=354, y=498
+ISOB7 B7 ISO 88mm x 125mm x=249, y=354
+ISOB8 B8 ISO 62mm x 88mm x=175, y=249
+ISOB9 B9 ISO 44mm x 62mm x=124, y=175
+ISOB10 B10 ISO 31mm x 44mm x=87, y=124
+
+B0 B0 JIS x=2919, y=4127
+B1 B1 JIS x=2063, y=2919
+B2 B2 JIS x=1459, y=2063
+B3 B3 JIS x=1029, y=1459
+B4 B4 JIS x=727, y=1029
+B5 B5 JIS x=518, y=727
+B6 B6 JIS x=362, y=518
+B7 B7 JIS x=257, y=362
+B8 B8 JIS x=180, y=257
+B9 B9 JIS x=127, y=180
+B10 B10 JIS x=90, y=127
* "C" series: Envelopes or folders suitable for A size stationery.
-C0 C0 917mm x 1297mm
-C1 C1 648mm x 917mm
-C2 C2 458mm x 648mm
-C3 C3 324mm x 458mm
-C4 C4 229mm x 324mm
-C5 C5 162mm x 229mm
-w354h918 B6-C4 125mm x 324mm
-C6 C6 114mm x 162mm
-DL DL 110mm x 220mm
-w229h459 C7-6 81mm x 162mm
-C7 C7 81mm x 114mm
-C8 C8 57mm x 81mm
-C9 C9 40mm x 57mm
-C10 C10 28mm x 40mm
+C0 C0 917mm x 1297mm x=2599, y=3676
+C1 C1 648mm x 917mm x=1836, y=2599
+C2 C2 458mm x 648mm x=1298, y=1836
+C3 C3 324mm x 458mm x=918, y=1298
+C4 C4 229mm x 324mm x=649, y=918
+C5 C5 162mm x 229mm x=459, y=649
+w354h918 B6-C4 125mm x 324mm x=354, y=918
+C6 C6 114mm x 162mm x=323, y=459
+DL DL 110mm x 220mm x=311, y=623
+w229h459 C7-6 81mm x 162mm x=229, y=459
+C7 C7 81mm x 114mm x=229, y=323
+C8 C8 57mm x 81mm x=161, y=229
+C9 C9 40mm x 57mm x=113, y=161
+C10 C10 28mm x 40mm x=79, y=113
* US CAD standard paper sizes
-ARCHA ArchA 9x12in
-ARCHB ArchB 12x18in
-ARCHC ArchC 18x24in
-ARCHD ArchD 24x36in
-ARCHE ArchE 36x48in
+ARCHA ArchA 9x12in x=648, y=864
+ARCHA_trans ArchA transverse 12x9 in x=864, y=648
+ARCHB ArchB 12x18in x=864, y=1296
+ARCHB_trans ArchB transverse 18x12in x=1296, y=864
+ARCHC ArchC 18x24in x=1296, y=1728
+ARCHC_trans ArchC transverse 24x18in x=1728, y=1296
+ARCHD ArchD 24x36in x=1728, y=2592
+ARCHD_trans ArchD transverse 36x24in x=2592, y=1728
+ARCHE ArchE 36x48in x=2592, y=3456
+ARCHE_trans ArchE transverse 48x36in x=3456, y=2592
* Foolscap
-w612h936 American foolscap
-w648h936 European foolscap
+w612h936 American foolscap x=612, y=936
+w648h936 European foolscap x=648, y=936
* Sizes for book production
* The BPIF and the Publishers Association jointly recommend ten
* standard metric sizes for case-bound titles as follows:
-w535h697 Crown Quarto 189mm x 246mm
-w569h731 Large Crown Quarto 201mm x 258mm
-w620h782 Demy Quarto 219mm x 276mm
-w671h884 Royal Quarto 237mm x 312mm
-w348h527 Crown Octavo 123mm x 186mm
-w365h561 Large Crown Octavo 129mm x 198mm
-w391h612 Demy Octavo 138mm x 216mm
-w442h663 Royal Octavo 156mm x 234mm
+w535h697 Crown Quarto 189mm x 246mm x=535, y=697
+w569h731 Large Crown Quarto 201mm x 258mm x=569, y=731
+w620h782 Demy Quarto 219mm x 276mm x=620, y=782
+w671h884 Royal Quarto 237mm x 312mm x=671, y=884
+w348h527 Crown Octavo 123mm x 186mm x=348, y=527
+w365h561 Large Crown Octavo 129mm x 198mm x=365, y=561
+w391h612 Demy Octavo 138mm x 216mm x=391, y=612
+w442h663 Royal Octavo 156mm x 234mm x=442, y=663
* Paperback sizes in common usage
-w314h504 Small paperback 111mm x 178mm
-w314h513 Penguin small paperback 111mm x 181mm
-w365h561 Penguin large paperback 129mm x 198mm
+w314h504 Small paperback 111mm x 178mm x=314, y=504
+w314h513 Penguin small paperback 111mm x 181mm x=314, y=513
+w365h561 Penguin large paperback 129mm x 198mm x=365, y=561
* Miscellaneous sizes
-w283h420 Hagaki Card 100 x 148 mm
-w420h567 Oufuku Card 148 x 200 mm
-w340h666 Long 3 Japanese long envelope #3
-w255h581 Long 4 Japanese long envelope #4
-w680h941 Kaku Japanese Kaku envelope #4
-COM10 Commercial 10 US Commercial 10 env
-w315h414 A2 Invitation US A2 invitation
+w283h420 Hagaki Card 100 x 148 mm x=283, y=420
+w420h567 Oufuku Card 148 x 200 mm x=420, y=567
+w340h666 Long 3 Japanese long envelope #3 x=340, y=666
+w255h581 Long 4 Japanese long envelope #4 x=255, y=581
+w680h941 Kaku Japanese Kaku envelope #4 x=680, y=941
+COM10 Commercial 10 US Commercial 10 env x=297, y=684
+w315h414 A2 Invitation US A2 invitation x=315, y=414
Color Balancing Values: (min,max,default)
@@ -1069,6 +1394,16 @@ All of the values below are interpreted as being relative to norms for
a particular printer established through testing, not "absolute"
values of any kind.
+The STP parameter is specified. The IJS parameter is created by
+removing the "-d" and beginning the options list with -sIjsParams.
+Thus
+
+-dCyan=xxx
+
+becomes
+
+-sIjsParams=Cyan=xxx
+
-dCyan=xxx xxx: 0.0 ... 4.0 (1.0)
-dMagenta=xxx xxx: 0.0 ... 4.0 (1.0)
-dYellow=xxx xxx: 0.0 ... 4.0 (1.0)
@@ -1133,9 +1468,11 @@ The option names are case sensitive. Two names are listed for each
resolution; the first (short) name is the value that must be passed to
-sDither, and the second (long) name is descriptive.
--sDither=algorithm
+STP: -sDither=algorithm
+IJS: -sIjsParams=Dither=algorithm
Adaptive Adaptive Hybrid
+EvenTone EvenTone screening (experimental)
Ordered Ordered
Fast Fast
VeryFast Very Fast
@@ -1146,6 +1483,17 @@ For continuous tone images, Ordered works just as well and is somewhat
faster. Ordered dithering yields noticeably inferior results with
text and intricate line art, particularly at high resolutions.
+EvenTone dithering is a relatively new screening technology developed
+by Raph Levien. It offers superior smoothness in highlights and
+midtones, and increased accuracy in shadows, resulting in
+significantly improved results overall. The version of EvenTone
+dithering that we are using is enhanced with some additional
+improvements we have made. It currently only operates with CMYK (4,
+6, or 7 color output) with RGB input, and should be considered
+experimental. Note that it is patented (see US patent 5917614), but
+it is licensed for use with GPL software. See
+http://www.levien.com/patents.html for more information.
+
Fast dithering, which is a simplified version of ordered dither, is
significantly faster, but color accuracy is worse, particularly on six
color printers and printer using variable dot sizes. On simple four
@@ -1173,12 +1521,19 @@ This is sometimes called "tearing". Its use is not recommended.
Output Type
------ ----
--dColor=x x: 0 ... 2 (1 on color printers, 0 otherwise)
+STP: -dColor=x x: 0 ... 2 (1 on color printers, 0 otherwise)
0 Grayscale
-1 Color
+1 Color (RGB)
2 Black and white
+IJS:
+
+Black and white: -sProcessColorModel=DeviceGray -dBitsPerSample=1
+Grayscale: -sProcessColorModel=DeviceGray
+Color (RGB): -sProcessColorModel=DeviceRGB
+Color (CMYK): -sProcessColorModel=DeviceCMYK
+
Choose color vs. grayscale output. Color output is the default.
Choosing -dColor=0 results in only black ink (no color ink) being
used, which is faster and usually results in the most accurate
@@ -1195,11 +1550,22 @@ Output Type
-dColor=2 prints only black and white (thresholding). This option
always uses Fast dithering unless you specify Very Fast.
+ CMYK output may be used with the IJS driver only. It is useful if
+ you're printing a CMYK graphic and want explicit control over the
+ inks. Generally it yields inferior quality, as Gimp-Print has good
+ algorithms for converting RGB (screen) into CMYK (inks) that take
+ into account paper type, ink type, and other variables. In CMYK
+ mode, the brightness, contrast, and saturation controls do not
+ function.
+
Image type (to optimize the dither):
----- ---- --- -------- --- --------
--dImageType=x x: 0 ... 2 (0)
+STP: -dImageType=x x: 0 ... 2 (0)
+
+IJS: -sIjsParams=ImageType=x
+
Select the image type most representative of what's being printed.
0 Line art (color or gray scale)
@@ -1232,14 +1598,36 @@ performance between the three image type options.
EXAMPLES:
---------
-Example 1 (print charts to file, color, 360 dpi):
+Note that a lot of these options are used for demonstration; generally
+adjusting the density is a bad idea!
+
+Example 1 (print charts to file, using A4 paper, color, 360 dpi):
gs -sDEVICE=stp -sModel=escp2-ex -dDensity=1.6 -dGamma=1.5 -dSaturation=0.9 \
- -dBrightness=.4 -dImageType=1 -sOutputFile=itsyourchoice.prn foo.ps
+ -dBrightness=.4 -dImageType=1 -sPAPERSIZE=a4 \
+ -sOutputFile=itsyourchoice.prn foo.ps
+
+gs -sDEVICE=ijs -sIjsServer=/usr/local/bin/ijsgimpprint \
+ -sDeviceManufacturer=EPSON -sDeviceModel=escp2-ex -sPAPERSIZE=a4 \
+ -sOutputFile=itsyourchoice.prn \
+ -sIjsParams=Density=1.6,Gamma=1.5,Saturation=0.9,Brightness=0.4,ImageType=1 \
+ foo.ps
Example 2 (print color photograph to /dev/lp0 at maximum quality):
gs -q -dSAFER -dNOPAUSE -sDEVICE=stp -sModel=escp2-870 -dDensity=0.8 \
- -r1440x720 -sQuality=1440x720hq -dImageType=2 -sOutputFile=/dev/lp0 foo.ps
+ -r1440x720 -sQuality=1440x720hq -sMediaType=GlossyPhoto \
+ -dImageType=2 -sOutputFile=/dev/lp0 foo.ps
+
+gs -sDEVICE=ijs -sIjsServer=/usr/local/bin/ijsgimpprint \
+ -sDeviceManufacturer=EPSON -sDeviceModel=escp2-870 \
+ -sOutputFile=/dev/lp0 \
+ -sIjsParams='Quality=1440x720hq,MediaType=GlossyPhoto,Density=0.8,ImageType=2' \
+ foo.ps
Example 3 (print pure black text to stdout)
gs -q -dSAFER -dNOPAUSE -sDEVICE=stp -sModel=escp2-660 -dDensity=0.8 -r720 \
-sQuality=720sw -dColor=2 -sOutputFile=- foo.ps
+
+gs -sDEVICE=ijs -sIjsServer=/usr/local/bin/ijsgimpprint \
+ -sDeviceManufacturer=EPSON -sDeviceModel=escp2-660 -dIjsUseOutputFD \
+ -sProcessColorModel=DeviceGray -dBitsPerSample=1 -sOutputFile=- \
+ -sIjsParams='Quality=720sw,Density=0.8' foo.ps
diff --git a/src/ghost/contrib.mak.addon.old b/src/ghost/contrib.mak.addon.old
index 7fd6e2f..2c03f85 100644
--- a/src/ghost/contrib.mak.addon.old
+++ b/src/ghost/contrib.mak.addon.old
@@ -9,6 +9,7 @@ stp_=$(GLOBJ)gdevstp.$(OBJ) \
$(GLOBJ)gdevstp-color.$(OBJ) \
$(GLOBJ)gdevstp-weave.$(OBJ) \
$(GLOBJ)gdevstp-escp2.$(OBJ) \
+ $(GLOBJ)gdevstp-escp2-data.$(OBJ) \
$(GLOBJ)gdevstp-lexmark.$(OBJ) \
$(GLOBJ)gdevstp-pcl.$(OBJ) \
$(GLOBJ)gdevstp-canon.$(OBJ) \
@@ -29,15 +30,18 @@ $(GLOBJ)gdevstp-weave.$(OBJ) : $(GLSRC)gdevstp-weave.c $(PDEVH) $(GLSRC)gdevstp-
$(GLOBJ)gdevstp-color.$(OBJ) : $(GLSRC)gdevstp-color.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h
$(GLCC) $(GLO_)gdevstp-color.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-color.c
-$(GLOBJ)gdevstp-dither.$(OBJ) : $(GLSRC)gdevstp-dither.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h
+$(GLOBJ)gdevstp-dither.$(OBJ) : $(GLSRC)gdevstp-dither.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h $(GLSRC)gdevstp-print-dither.h
$(GLCC) $(GLO_)gdevstp-dither.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-dither.c
-$(GLOBJ)gdevstp-dither-matrices.$(OBJ) : $(GLSRC)gdevstp-dither-matrices.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h
+$(GLOBJ)gdevstp-dither-matrices.$(OBJ) : $(GLSRC)gdevstp-dither-matrices.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h $(GLSRC)gdevstp-print-dither.h
$(GLCC) $(GLO_)gdevstp-dither-matrices.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-dither-matrices.c
-$(GLOBJ)gdevstp-escp2.$(OBJ) : $(GLSRC)gdevstp-escp2.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h
+$(GLOBJ)gdevstp-escp2.$(OBJ) : $(GLSRC)gdevstp-escp2.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h $(GLSRC)gdevstp-print-escp2.h
$(GLCC) $(GLO_)gdevstp-escp2.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-escp2.c
+$(GLOBJ)gdevstp-escp2-data.$(OBJ) : $(GLSRC)gdevstp-escp2-data.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h $(GLSRC)gdevstp-print-escp2.h
+ $(GLCC) $(GLO_)gdevstp-escp2-data.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-escp2-data.c
+
$(GLOBJ)gdevstp-lexmark.$(OBJ) : $(GLSRC)gdevstp-lexmark.c $(PDEVH) $(GLSRC)gdevstp-print.h $(GLSRC)gdevstp-print-internal.h
$(GLCC) $(GLO_)gdevstp-lexmark.$(OBJ) $(C_) -DDISABLE_NLS $(GLSRC)gdevstp-lexmark.c
diff --git a/src/ghost/devs.mak.addon-5.10 b/src/ghost/devs.mak.addon-5.10
index b855859..90bf684 100644
--- a/src/ghost/devs.mak.addon-5.10
+++ b/src/ghost/devs.mak.addon-5.10
@@ -9,6 +9,7 @@ stp_=gdevstp.$(OBJ) \
gdevstp-color.$(OBJ) \
gdevstp-weave.$(OBJ) \
gdevstp-escp2.$(OBJ) \
+ gdevstp-escp2-data.$(OBJ) \
gdevstp-lexmark.$(OBJ) \
gdevstp-pcl.$(OBJ) \
gdevstp-canon.$(OBJ) \
@@ -29,15 +30,18 @@ gdevstp-weave.$(OBJ) : gdevstp-weave.c $(PDEVH) gdevstp-print.h gdevstp-print-in
gdevstp-color.$(OBJ) : gdevstp-color.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h
$(CCC) -DDISABLE_NLS gdevstp-color.c
-gdevstp-dither.$(OBJ) : gdevstp-dither.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h
+gdevstp-dither.$(OBJ) : gdevstp-dither.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h gdevstp-print-dither.h
$(CCC) -DDISABLE_NLS gdevstp-dither.c
-gdevstp-dither-matrices.$(OBJ) : gdevstp-dither-matrices.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h
+gdevstp-dither-matrices.$(OBJ) : gdevstp-dither-matrices.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h gdevstp-print-dither.h
$(CCC) -DDISABLE_NLS gdevstp-dither.c
-gdevstp-escp2.$(OBJ) : gdevstp-escp2.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h
+gdevstp-escp2.$(OBJ) : gdevstp-escp2.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h gdevstp-print-escp2.h
$(CCC) -DDISABLE_NLS gdevstp-escp2.c
+gdevstp-escp2-data.$(OBJ) : gdevstp-escp2-data.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h gdevstp-print-escp2.h
+ $(CCC) -DDISABLE_NLS gdevstp-escp2-data.c
+
gdevstp-lexmark.$(OBJ) : gdevstp-lexmark.c $(PDEVH) gdevstp-print.h gdevstp-print-internal.h
$(CCC) -DDISABLE_NLS gdevstp-lexmark.c
diff --git a/src/ghost/gdevstp.c b/src/ghost/gdevstp.c
index f73ce7f..2b565f6 100644
--- a/src/ghost/gdevstp.c
+++ b/src/ghost/gdevstp.c
@@ -25,7 +25,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*$Id: gdevstp.c,v 1.14 2001/10/27 17:16:38 rlk Exp $ */
+/*$Id: gdevstp.c,v 1.14.2.1 2002/01/24 01:29:02 rlk Exp $ */
/* stp output driver */
#include "gdevprn.h"
#include "gdevpccm.h"
@@ -594,6 +594,8 @@ stp_open(gx_device *pdev)
st[2] = (float)(width-right) / 72; /* right margin */
stp_set_top(stp_data.v, 0);
+ stp_set_left(stp_data.v, 0);
+ stp_set_orientation(stp_data.v, ORIENT_PORTRAIT);
stp_data.bottom = bottom + height-top;
stp_print_debug("stp_open", pdev, &stp_data);
diff --git a/src/ghost/ijsgimpprint.c b/src/ghost/ijsgimpprint.c
new file mode 100644
index 0000000..2ec49cf
--- /dev/null
+++ b/src/ghost/ijsgimpprint.c
@@ -0,0 +1,1028 @@
+/*
+ * $Id: ijsgimpprint.c,v 1.2.2.15 2002/12/08 21:12:40 rlk Exp $
+ *
+ * ijs server for gimp-print.
+ *
+ * Copyright 2001 Robert Krawitz (rlk@alum.mit.edu)
+ *
+ * Originally written by Russell Lang, copyright assigned to Robert Krawitz.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Revision History:
+ *
+ * See ChangeLog
+ */
+
+/* ijs server for gimp-print */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gimp-print/gimp-print.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <locale.h>
+#include <ijs.h>
+#include <ijs_server.h>
+#include <errno.h>
+#include <gimp-print/gimp-print-intl-internal.h>
+
+static int stp_debug = 0;
+
+#define STP_DEBUG(x) do { if (stp_debug || getenv("STP_DEBUG")) x; } while (0)
+
+typedef struct _GimpParamList GimpParamList;
+
+struct _GimpParamList {
+ GimpParamList *next;
+ char *key;
+ char *value;
+ int value_size;
+};
+
+typedef struct _IMAGE
+{
+ IjsServerCtx *ctx;
+ stp_vars_t v;
+ char *filename; /* OutputFile */
+ int fd; /* OutputFD + 1 (so that 0 is invalid) */
+ int width; /* pixels */
+ int height; /* pixels */
+ int bps; /* bytes per sample */
+ int n_chan; /* number of channels */
+ int xres; /* dpi */
+ int yres;
+ int output_type;
+ int row; /* row number in buffer */
+ int row_width; /* length of a row */
+ char *row_buf; /* buffer for raster */
+ double total_bytes; /* total size of raster */
+ double bytes_left; /* bytes remaining to be read */
+ GimpParamList *params;
+} IMAGE;
+
+static const char DeviceGray[] = "DeviceGray";
+static const char DeviceRGB[] = "DeviceRGB";
+static const char DeviceCMYK[] = "DeviceCMYK";
+
+static char *
+c_strdup(const char *s)
+{
+ char *ret = malloc(strlen(s) + 1);
+ strcpy(ret, s);
+ return ret;
+}
+
+static int
+image_init(IMAGE *img, IjsPageHeader *ph)
+{
+ img->width = ph->width;
+ img->height = ph->height;
+ img->bps = ph->bps;
+ img->n_chan = ph->n_chan;
+ img->xres = ph->xres;
+ img->yres = ph->yres;
+
+ img->row = -1;
+ img->row_width = (ph->n_chan * ph->bps * ph->width + 7) >> 3;
+ img->row_buf = (char *)malloc(img->row_width);
+ STP_DEBUG(fprintf(stderr, "image_init\n"));
+ STP_DEBUG(fprintf(stderr,
+ "ph width %d height %d bps %d n_chan %d xres %f yres %f\n",
+ ph->width, ph->height, ph->bps, ph->n_chan, ph->xres,
+ ph->yres));
+
+ if ((img->bps == 1) && (img->n_chan == 1) &&
+ (strncmp(ph->cs, DeviceGray, strlen(DeviceGray)) == 0))
+ {
+ STP_DEBUG(fprintf(stderr, "output monochrome\n"));
+ img->output_type = OUTPUT_MONOCHROME;
+ /* 8-bit greyscale */
+ }
+ else if ((img->bps == 8) && (img->n_chan == 1) &&
+ (strncmp(ph->cs, DeviceGray, strlen(DeviceGray)) == 0))
+ {
+ STP_DEBUG(fprintf(stderr, "output gray\n"));
+ img->output_type = OUTPUT_GRAY;
+ /* 8-bit greyscale */
+ }
+ else if ((img->bps == 8) && (img->n_chan == 3) &&
+ (strncmp(ph->cs, DeviceRGB, strlen(DeviceRGB)) == 0))
+ {
+ STP_DEBUG(fprintf(stderr, "output color\n"));
+ img->output_type = OUTPUT_COLOR;
+ /* 24-bit colour */
+ }
+ else if ((img->bps == 8) && (img->n_chan == 4) &&
+ (strncmp(ph->cs, DeviceCMYK, strlen(DeviceCMYK)) == 0))
+ {
+ STP_DEBUG(fprintf(stderr, "output CMYK\n"));
+ img->output_type = OUTPUT_RAW_CMYK;
+ /* 32-bit CMYK colour */
+ }
+ else
+ {
+ fprintf(stderr, _("Bad color space: bps %d channels %d space %s\n"),
+ img->bps, img->n_chan, ph->cs);
+ /* unsupported */
+ return -1;
+ }
+
+ if (img->row_buf == NULL)
+ {
+ STP_DEBUG(fprintf(stderr, _("No row buffer\n")));
+ return -1;
+ }
+
+ return 0;
+}
+
+static void
+image_finish(IMAGE *img)
+{
+ if (img->row_buf)
+ free(img->row_buf);
+ img->row_buf = NULL;
+}
+
+static int
+get_float(const char *str, const char *name, float *pval,
+ float min_value, float max_value)
+{
+ float new_value;
+ /* Force locale to "C", because decimal numbers coming from the IJS
+ client are always with a decimal point, nver with a decimal comma */
+ setlocale(LC_ALL, "C");
+ if (sscanf(str, "%f", &new_value) == 1)
+ {
+ setlocale(LC_ALL, "");
+ if ((new_value >= min_value) && (new_value <= max_value))
+ {
+ *pval = new_value;
+ return 0;
+ }
+ else
+ fprintf(stderr,
+ _("Parameter %s out of range (value %f, min %f, max %f)\n"),
+ name, new_value, min_value, max_value);
+ }
+ else
+ {
+ setlocale(LC_ALL, "");
+ fprintf(stderr, _("Unable to parse parameter %s=%s (expect a number)\n"),
+ name, str);
+ }
+ return -1;
+}
+
+static int
+get_int(const char *str, const char *name, int *pval,
+ int min_value, int max_value)
+{
+ int new_value;
+ /* Force locale to "C", because decimal numbers sent to the IJS
+ client must have a decimal point, nver a decimal comma */
+ setlocale(LC_ALL, "C");
+ if (sscanf(str, "%d", &new_value) == 1)
+ {
+ setlocale(LC_ALL, "");
+ if ((new_value >= min_value) && (new_value <= max_value))
+ {
+ *pval = new_value;
+ return 0;
+ }
+ fprintf(stderr,
+ _("Parameter %s out of range (value %d, min %d, max %d)\n"),
+ name, new_value, min_value, max_value);
+ }
+ else
+ {
+ setlocale(LC_ALL, "");
+ fprintf(stderr, _("Unable to parse parameter %s=%s (expect a number)\n"),
+ name, str);
+ }
+ return -1;
+}
+
+/* A C implementation of /^(\d\.+\-eE)+x(\d\.+\-eE)+$/ */
+static int
+gimp_parse_wxh (const char *val, int size,
+ double *pw, double *ph)
+{
+ char buf[256];
+ char *tail;
+ int i;
+
+ for (i = 0; i < size; i++)
+ if (val[i] == 'x')
+ break;
+
+ if (i + 1 >= size)
+ return IJS_ESYNTAX;
+
+ if (i >= sizeof(buf))
+ return IJS_EBUF;
+
+ memcpy (buf, val, i);
+ buf[i] = 0;
+ /* Force locale to "C", because decimal numbers coming from the IJS
+ client are always with a decimal point, nver with a decimal comma */
+ setlocale(LC_ALL, "C");
+ *pw = strtod (buf, &tail);
+ setlocale(LC_ALL, "");
+ if (tail == buf)
+ return IJS_ESYNTAX;
+
+ if (size - i > sizeof(buf))
+ return IJS_EBUF;
+
+ memcpy (buf, val + i + 1, size - i - 1);
+ buf[size - i - 1] = 0;
+ /* Force locale to "C", because decimal numbers coming from the IJS
+ client are always with a decimal point, nver with a decimal comma */
+ setlocale(LC_ALL, "C");
+ *ph = strtod (buf, &tail);
+ setlocale(LC_ALL, "");
+ if (tail == buf)
+ return IJS_ESYNTAX;
+
+ return 0;
+}
+
+/**
+ * gimp_find_key: Search parameter list for key.
+ *
+ * @key: key to look up
+ *
+ * Return value: GimpParamList entry matching @key, or NULL.
+ **/
+static GimpParamList *
+gimp_find_key (GimpParamList *pl, const char *key)
+{
+ GimpParamList *curs;
+
+ for (curs = pl; curs != NULL; curs = curs->next)
+ {
+ if (!strcmp (curs->key, key))
+ return curs;
+ }
+ return NULL;
+}
+
+static int
+gimp_status_cb (void *status_cb_data,
+ IjsServerCtx *ctx,
+ IjsJobId job_id)
+{
+ return 0;
+}
+
+static int
+gimp_list_cb (void *list_cb_data,
+ IjsServerCtx *ctx,
+ IjsJobId job_id,
+ char *val_buf,
+ int val_size)
+{
+ const char *param_list = "OutputFile,OutputFD,DeviceManufacturer,DeviceModel,Quality,MediaName,MediaType,MediaSource,InkType,Dither,ImageType,Brightness,Gamma,Contrast,Cyan,Magenta,Yellow,Saturation,Density,PrintableArea,PrintableTopLeft,TopLeft,Dpi";
+ int size = strlen (param_list);
+
+ if (size > val_size)
+ return IJS_EBUF;
+
+ memcpy (val_buf, param_list, size);
+ return size;
+}
+
+static int
+gimp_enum_cb (void *enum_cb_data,
+ IjsServerCtx *ctx,
+ IjsJobId job_id,
+ const char *key,
+ char *val_buf,
+ int val_size)
+{
+ const char *val = NULL;
+ if (!strcmp (key, "ColorSpace"))
+ val = "DeviceRGB,DeviceGray,DeviceCMYK";
+ else if (!strcmp (key, "DeviceManufacturer"))
+ val = "Gimp-Print";
+ else if (!strcmp (key, "DeviceModel"))
+ val = "gimp-print";
+ else if (!strcmp (key, "PageImageFormat"))
+ val = "Raster";
+
+ if (val == NULL)
+ return IJS_EUNKPARAM;
+ else
+ {
+ int size = strlen (val);
+
+ if (size > val_size)
+ return IJS_EBUF;
+ memcpy (val_buf, val, size);
+ return size;
+ }
+}
+
+static int
+gimp_get_cb (void *get_cb_data,
+ IjsServerCtx *ctx,
+ IjsJobId job_id,
+ const char *key,
+ char *val_buf,
+ int val_size)
+{
+ IMAGE *img = (IMAGE *)get_cb_data;
+ stp_vars_t v = img->v;
+ stp_printer_t printer = stp_get_printer_by_driver(stp_get_driver(v));
+ GimpParamList *pl = img->params;
+ GimpParamList *curs;
+ const char *val = NULL;
+ char buf[256];
+
+ STP_DEBUG(fprintf(stderr, "gimp_get_cb: %s\n", key));
+ if (!printer)
+ {
+ if (strlen(stp_get_driver(v)) == 0)
+ fprintf(stderr, _("Printer must be specified with -sModel\n"));
+ else
+ fprintf(stderr, _("Printer %s is not a known model\n"),
+ stp_get_driver(v));
+ return IJS_EUNKPARAM;
+ }
+ curs = gimp_find_key (pl, key);
+ if (curs != NULL)
+ {
+ if (curs->value_size > val_size)
+ return IJS_EBUF;
+ memcpy (val_buf, curs->value, curs->value_size);
+ return curs->value_size;
+ }
+
+ if (!strcmp(key, "PrintableArea"))
+ {
+ int l, r, b, t;
+ int h, w;
+ (*stp_printer_get_printfuncs(printer)->imageable_area)
+ (printer, v, &l, &r, &b, &t);
+ h = t - b;
+ w = r - l;
+ /* Force locale to "C", because decimal numbers sent to the IJS
+ client must have a decimal point, nver a decimal comma */
+ setlocale(LC_ALL, "C");
+ sprintf(buf, "%gx%g", (double) w / 72.0, (double) h / 72.0);
+ setlocale(LC_ALL, "");
+ STP_DEBUG(fprintf(stderr, "PrintableArea %d %d %s\n", h, w, buf));
+ val = buf;
+ }
+ else if (!strcmp(key, "Dpi"))
+ {
+ int x, y;
+ (*stp_printer_get_printfuncs(printer)->describe_resolution)
+ (printer, stp_get_resolution(v), &x, &y);
+ /* Force locale to "C", because decimal numbers sent to the IJS
+ client must have a decimal point, nver a decimal comma */
+ setlocale(LC_ALL, "C");
+ sprintf(buf, "%d", x);
+ setlocale(LC_ALL, "");
+ STP_DEBUG(fprintf(stderr, "Dpi %d %d (%d) %s\n", x, y, x, buf));
+ stp_set_scaling(v, -x);
+ val = buf;
+ }
+ else if (!strcmp(key, "PrintableTopLeft"))
+ {
+ int l, r, b, t;
+ int h, w;
+ (*stp_printer_get_printfuncs(printer)->media_size)
+ (printer, v, &w, &h);
+ (*stp_printer_get_printfuncs(printer)->imageable_area)
+ (printer, v, &l, &r, &b, &t);
+ t = h - t;
+ /* Force locale to "C", because decimal numbers sent to the IJS
+ client must have a decimal point, nver a decimal comma */
+ setlocale(LC_ALL, "C");
+ sprintf(buf, "%gx%g", (double) l / 72.0, (double) t / 72.0);
+ setlocale(LC_ALL, "");
+ STP_DEBUG(fprintf(stderr, "PrintableTopLeft %d %d %s\n", t, l, buf));
+ val = buf;
+ }
+ else if (!strcmp (key, "DeviceManufacturer"))
+ val = "Gimp-Print";
+ else if (!strcmp (key, "DeviceModel"))
+ val = stp_get_driver(img->v);
+ else if (!strcmp (key, "PageImageFormat"))
+ val = "Raster";
+
+ if (val == NULL)
+ return IJS_EUNKPARAM;
+ else
+ {
+ int size = strlen (val);
+
+ if (size > val_size)
+ return IJS_EBUF;
+ memcpy (val_buf, val, size);
+ return size;
+ }
+}
+
+static int
+gimp_set_cb (void *set_cb_data, IjsServerCtx *ctx, IjsJobId jobid,
+ const char *key, const char *value, int value_size)
+{
+ int code = 0;
+ char vbuf[256];
+ const stp_vars_t lower = stp_minimum_settings();
+ const stp_vars_t upper = stp_maximum_settings();
+ int i;
+ float z;
+ IMAGE *img = (IMAGE *)set_cb_data;
+ STP_DEBUG(fprintf (stderr, "gimp_set_cb: %s=", key));
+ STP_DEBUG(fwrite (value, 1, value_size, stderr));
+ STP_DEBUG(fputs ("\n", stderr));
+ if (value_size > sizeof(vbuf)-1)
+ return -1;
+ memset(vbuf, 0, sizeof(vbuf));
+ memcpy(vbuf, value, value_size);
+
+ if (strcmp(key, "OutputFile") == 0)
+ {
+ if (img->filename)
+ free(img->filename);
+ img->filename = c_strdup(vbuf);
+ }
+ else if (strcmp(key, "OutputFD") == 0) {
+ /* Force locale to "C", because decimal numbers sent to the IJS
+ client must have a decimal point, nver a decimal comma */
+ setlocale(LC_ALL, "C");
+ img->fd = atoi(vbuf) + 1;
+ setlocale(LC_ALL, "");
+ } else if (strcmp(key, "DeviceManufacturer") == 0)
+ ; /* We don't care who makes it */
+ else if (strcmp(key, "DeviceModel") == 0)
+ {
+ stp_printer_t printer = stp_get_printer_by_driver(vbuf);
+ stp_set_driver(img->v, vbuf);
+ if (printer)
+ {
+ stp_set_printer_defaults(img->v, printer, NULL);
+ if (strlen(stp_get_resolution(img->v)) == 0)
+ stp_set_resolution(img->v,
+ ((*stp_printer_get_printfuncs(printer)->default_parameters)
+ (printer, NULL, "Resolution")));
+ if (strlen(stp_get_dither_algorithm(img->v)) == 0)
+ stp_set_dither_algorithm(img->v, stp_default_dither_algorithm());
+ }
+ else
+ code = IJS_ERANGE;
+ }
+ else if (strcmp(key, "PPDFile") == 0)
+ stp_set_ppd_file(img->v, vbuf);
+ else if (strcmp(key, "Quality") == 0)
+ stp_set_resolution(img->v, vbuf);
+#if 0
+ else if (strcmp(key, "MediaName") == 0)
+ stp_set_media_size(img->v, vbuf);
+#endif
+ else if (strcmp(key, "TopLeft") == 0)
+ {
+ int l, r, b, t, pw, ph;
+ double w, h;
+ stp_printer_t printer =
+ (stp_get_printer_by_driver(stp_get_driver(img->v)));
+ ((*stp_printer_get_printfuncs(printer)->imageable_area))
+ (printer, img->v, &l, &r, &b, &t);
+ (*stp_printer_get_printfuncs(printer)->media_size)
+ (printer, img->v, &pw, &ph);
+ STP_DEBUG(fprintf(stderr, "l %d r %d t %d b %d pw %d ph %d\n",
+ l, r, t, b, pw, ph));
+ code = gimp_parse_wxh(vbuf, strlen(vbuf), &w, &h);
+ if (code == 0)
+ {
+ int al = (w * 72) - l;
+ int ah = (h * 72) - (ph - t);
+ STP_DEBUG(fprintf(stderr, "left top %f %f %d %d %s\n",
+ w * 72, h * 72, al, ah, vbuf));
+ if (al >= 0)
+ stp_set_left(img->v, al);
+ if (ah >= 0)
+ stp_set_top(img->v, ah);
+ }
+ }
+ else if (strcmp(key, "PaperSize") == 0)
+ {
+ double w, h;
+ code = gimp_parse_wxh(vbuf, strlen(vbuf), &w, &h);
+ if (code == 0)
+ {
+ stp_papersize_t p;
+ w *= 72;
+ h *= 72;
+ STP_DEBUG(fprintf(stderr, "paper size %f %f %s\n", w, h, vbuf));
+ stp_set_page_width(img->v, w);
+ stp_set_page_height(img->v, h);
+ if ((p = stp_get_papersize_by_size(h, w)) != NULL)
+ {
+ STP_DEBUG(fprintf(stderr, "Found page size %s\n",
+ stp_papersize_get_name(p)));
+ stp_set_media_size(img->v, stp_papersize_get_name(p));
+ }
+ else
+ STP_DEBUG(fprintf(stderr, "No matching paper size found\n"));
+ }
+ }
+ else if (strcmp(key, "MediaType") == 0)
+ stp_set_media_type(img->v, vbuf);
+ else if (strcmp(key, "MediaSource") == 0)
+ stp_set_media_source(img->v, vbuf);
+ else if (strcmp(key, "InkType") == 0)
+ stp_set_ink_type(img->v, vbuf);
+ else if (strcmp(key, "Dither") == 0)
+ stp_set_dither_algorithm(img->v, vbuf);
+ else if (strcmp(key, "ImageType") == 0)
+ {
+ code = get_int(vbuf, key, &i,
+ stp_get_image_type(lower), stp_get_image_type(upper));
+ if (code == 0)
+ stp_set_image_type(img->v, i);
+ }
+ else if (strcmp(key, "Brightness") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_brightness(lower), stp_get_brightness(upper));
+ if (code == 0)
+ stp_set_brightness(img->v, z);
+ }
+ else if (strcmp(key, "Gamma") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_gamma(lower), stp_get_gamma(upper));
+ if (code == 0)
+ stp_set_gamma(img->v, z);
+ }
+ else if (strcmp(key, "Contrast") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_contrast(lower), stp_get_contrast(upper));
+ if (code == 0)
+ stp_set_contrast(img->v, z);
+ }
+ else if (strcmp(key, "Cyan") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_cyan(lower), stp_get_cyan(upper));
+ if (code == 0)
+ stp_set_cyan(img->v, z);
+ }
+ else if (strcmp(key, "Magenta") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_magenta(lower), stp_get_magenta(upper));
+ if (code == 0)
+ stp_set_magenta(img->v, z);
+ }
+ else if (strcmp(key, "Yellow") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_yellow(lower), stp_get_yellow(upper));
+ if (code == 0)
+ stp_set_yellow(img->v, z);
+ }
+ else if (strcmp(key, "Saturation") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_saturation(lower), stp_get_saturation(upper));
+ if (code == 0)
+ stp_set_saturation(img->v, z);
+ }
+ else if (strcmp(key, "Density") == 0)
+ {
+ code = get_float(vbuf, key, &z,
+ stp_get_density(lower), stp_get_density(upper));
+ if (code == 0)
+ stp_set_density(img->v, z);
+ }
+ else if (strcmp (key, "Duplex") == 0)
+ {
+ }
+ else if (strcmp (key, "PS:Duplex") == 0)
+ {
+ }
+ else if (strcmp (key, "Tumble") == 0)
+ {
+ }
+ else if (strcmp (key, "PS:Tumble") == 0)
+ {
+ }
+ else
+ {
+ fprintf(stderr, _("Unknown option %s\n"), key);
+ code = -1;
+ }
+
+ if (code == 0)
+ {
+ GimpParamList *pl = gimp_find_key (img->params, key);
+
+ if (pl == NULL)
+ {
+ pl = (GimpParamList *)malloc (sizeof (GimpParamList));
+ pl->next = img->params;
+ pl->key = malloc (strlen(key) + 1);
+ memcpy (pl->key, key, strlen(key) + 1);
+ img->params = pl;
+ }
+ else
+ {
+ free (pl->value);
+ }
+ pl->value = malloc (value_size);
+ memcpy (pl->value, value, value_size);
+ pl->value_size = value_size;
+ }
+
+ return code;
+}
+
+/**********************************************************/
+
+static void
+gimp_outfunc(void *data, const char *buffer, size_t bytes)
+{
+ if ((data != NULL) && (buffer != NULL) && (bytes != 0))
+ fwrite(buffer, 1, bytes, (FILE *)data);
+}
+
+/**********************************************************/
+/* stp_image_t functions */
+
+static void
+gimp_image_init(stp_image_t *image)
+{
+}
+
+static void
+gimp_image_reset(stp_image_t *image)
+{
+}
+
+/* bytes per pixel (NOT bits per pixel) */
+static int
+gimp_image_bpp(stp_image_t *image)
+{
+ IMAGE *img = (IMAGE *)(image->rep);
+ STP_DEBUG(fprintf(stderr, "gimp_image_bpp: bps=%d n_chan=%d returning %d\n",
+ img->bps, img->n_chan, (img->bps * img->n_chan + 7) / 8));
+ return (img->bps * img->n_chan + 7) / 8;
+}
+
+static int
+gimp_image_width(stp_image_t *image)
+{
+ IMAGE *img = (IMAGE *)(image->rep);
+ return img->width;
+}
+
+static int
+gimp_image_height(stp_image_t *image)
+{
+ IMAGE *img = (IMAGE *)(image->rep);
+ return img->height * img->xres / img->yres;
+}
+
+static int
+image_next_row(IMAGE *img)
+{
+ int status = 0;
+ double n_bytes = img->bytes_left;
+ if (img->bytes_left)
+ {
+
+ if (n_bytes > img->row_width)
+ n_bytes = img->row_width;
+#ifdef VERBOSE
+ STP_DEBUG(fprintf(stderr, "%.0f bytes left, reading %.d, on row %d\n",
+ img->bytes_left, (int) n_bytes, img->row));
+#endif
+ status = ijs_server_get_data(img->ctx, img->row_buf, (int) n_bytes);
+ if (status)
+ {
+ STP_DEBUG(fprintf(stderr, "page aborted!\n"));
+ }
+ else
+ {
+ img->row++;
+ img->bytes_left -= n_bytes;
+ }
+ }
+ else
+ return 1; /* Done */
+ return status;
+}
+
+static stp_image_status_t
+gimp_image_get_row(stp_image_t *image, unsigned char *data, int row)
+{
+ IMAGE *img = (IMAGE *)(image->rep);
+ int physical_row = row * img->yres / img->xres;
+
+ if ((physical_row < 0) || (physical_row >= img->height))
+ return STP_IMAGE_ABORT;
+
+ /* Read until we reach the requested row. */
+ while (physical_row > img->row)
+ {
+ if (image_next_row(img))
+ return STP_IMAGE_ABORT;
+ }
+
+ if (physical_row == img->row)
+ {
+ unsigned i, j, length;
+ switch (img->bps)
+ {
+ case 8:
+ memcpy(data, img->row_buf, img->row_width);
+ break;
+ case 1:
+ length = img->width / 8;
+ for (i = 0; i < length; i++)
+ for (j = 128; j > 0; j >>= 1)
+ {
+ if (img->row_buf[i] & j)
+ data[0] = 255;
+ else
+ data[0] = 0;
+ data++;
+ }
+ length = img->width % 8;
+ for (j = 128; j > 1 << (7 - length); j >>= 1)
+ {
+ if (img->row_buf[i] & j)
+ data[0] = 255;
+ else
+ data[0] = 0;
+ data++;
+ }
+ break;
+ default:
+ return STP_IMAGE_ABORT;
+ }
+ }
+ else
+ return STP_IMAGE_ABORT;
+ return STP_IMAGE_OK;
+}
+
+
+static const char *
+gimp_image_get_appname(stp_image_t *image)
+{
+ return "ijsgimp";
+}
+
+static void
+gimp_image_progress_init(stp_image_t *image)
+{
+}
+
+static void
+gimp_image_note_progress(stp_image_t *image, double current, double total)
+{
+ char buf[256];
+ sprintf(buf, _("%.0f of %.0f\n"), current, total);
+ STP_DEBUG(gimp_outfunc(stderr, buf, strlen(buf)));
+}
+
+static void
+gimp_image_progress_conclude(stp_image_t *image)
+{
+}
+
+/**********************************************************/
+
+static void
+stp_dbg(const char *msg, const stp_vars_t v)
+{
+ fprintf(stderr,"%s Settings: c: %f m: %f y: %f\n",
+ msg, stp_get_cyan(v), stp_get_magenta(v), stp_get_yellow(v));
+ fprintf(stderr, "Ink type %s\n", stp_get_ink_type(v));
+ fprintf(stderr,"Settings: bright: %f contrast: %f\n",
+ stp_get_brightness(v), stp_get_contrast(v));
+ fprintf(stderr,"Settings: Gamma: %f Saturation: %f Density: %f\n",
+ stp_get_gamma(v), stp_get_saturation(v), stp_get_density(v));
+ fprintf(stderr, "Settings: width %d, height %d\n",
+ stp_get_page_width(v), stp_get_page_height(v));
+ fprintf(stderr, "Settings: output type %d image type %d\n",
+ stp_get_output_type(v), stp_get_image_type(v));
+ fprintf(stderr, "Settings: Quality %s\n", stp_get_resolution(v));
+ fprintf(stderr, "Settings: Dither %s\n", stp_get_dither_algorithm(v));
+ fprintf(stderr, "Settings: MediaSource %s\n", stp_get_media_source(v));
+ fprintf(stderr, "Settings: MediaType %s\n", stp_get_media_type(v));
+ fprintf(stderr, "Settings: MediaSize %s\n", stp_get_media_size(v));
+ fprintf(stderr, "Settings: Model %s\n", stp_get_driver(v));
+ fprintf(stderr, "Settings: InkType %s\n", stp_get_ink_type(v));
+ fprintf(stderr, "Settings: OutputTo %s\n", stp_get_output_to(v));
+}
+
+int
+main (int argc, char **argv)
+{
+ IjsPageHeader ph;
+ int status;
+ int page = 0;
+ IMAGE img;
+ stp_image_t si;
+ stp_printer_t printer = NULL;
+ FILE *f = NULL;
+
+ memset(&img, 0, sizeof(img));
+
+ img.ctx = ijs_server_init();
+ if (img.ctx == NULL)
+ return 1;
+
+ stp_init();
+ img.v = stp_allocate_vars();
+ if (img.v == NULL)
+ {
+ ijs_server_done(img.ctx);
+ return 1;
+ }
+ stp_set_top(img.v, 0);
+ stp_set_left(img.v, 0);
+ stp_set_orientation(img.v, ORIENT_PORTRAIT);
+
+ /* Error messages to stderr. */
+ stp_set_errfunc(img.v, gimp_outfunc);
+ stp_set_errdata(img.v, stderr);
+
+ /* Printer data goes to file f, but we haven't opened it yet. */
+ stp_set_outfunc(img.v, gimp_outfunc);
+ stp_set_outdata(img.v, NULL);
+
+ memset(&si, 0, sizeof(si));
+ si.init = gimp_image_init;
+ si.reset = gimp_image_reset;
+ si.transpose = NULL;
+ si.hflip = NULL;
+ si.vflip = NULL;
+ si.crop = NULL;
+ si.rotate_ccw = NULL;
+ si.rotate_cw = NULL;
+ si.rotate_180 = NULL;
+ si.bpp = gimp_image_bpp;
+ si.width = gimp_image_width;
+ si.height = gimp_image_height;
+ si.get_row = gimp_image_get_row;
+ si.get_appname = gimp_image_get_appname;
+ si.progress_init = gimp_image_progress_init;
+ si.note_progress = gimp_image_note_progress;
+ si.progress_conclude = gimp_image_progress_conclude;
+ si.rep = &img;
+
+ ijs_server_install_status_cb (img.ctx, gimp_status_cb, &img);
+ ijs_server_install_list_cb (img.ctx, gimp_list_cb, &img);
+ ijs_server_install_enum_cb (img.ctx, gimp_enum_cb, &img);
+ ijs_server_install_get_cb (img.ctx, gimp_get_cb, &img);
+ ijs_server_install_set_cb(img.ctx, gimp_set_cb, &img);
+
+ STP_DEBUG(stp_dbg("about to start", img.v));
+
+ do
+ {
+
+ status = ijs_server_get_page_header(img.ctx, &ph);
+ if (status)
+ {
+ if (status < 0)
+ fprintf(stderr, _("ijs_server_get_page_header failed %d\n"),
+ status);
+ break;
+ }
+ STP_DEBUG(fprintf(stderr, "got page header, %d x %d\n",
+ ph.width, ph.height));
+ STP_DEBUG(stp_dbg("have page header", img.v));
+
+ status = image_init(&img, &ph);
+ if (status)
+ {
+ fprintf(stderr, _("image_init failed %d\n"), status);
+ break;
+ }
+
+ if (page == 0)
+ {
+ if (img.fd)
+ {
+ f = fdopen(img.fd - 1, "wb");
+ if (!f)
+ {
+ fprintf(stderr, _("Unable to open file descriptor: %s\n"),
+ strerror(errno));
+ status = -1;
+ break;
+ }
+ }
+ else if (img.filename && strlen(img.filename) > 0)
+ {
+ f = fopen(img.filename, "wb");
+ if (!f)
+ {
+ status = -1;
+ fprintf(stderr, _("Unable to open %s: %s\n"), img.filename,
+ strerror(errno));
+ break;
+ }
+ }
+
+ /* Printer data to file */
+ stp_set_outdata(img.v, f);
+
+ printer = stp_get_printer_by_driver(stp_get_driver(img.v));
+ if (printer == NULL)
+ {
+ fprintf(stderr, _("Unknown printer %s\n"),
+ stp_get_driver(img.v));
+ status = -1;
+ break;
+ }
+ stp_merge_printvars(img.v, stp_printer_get_printvars(printer));
+ if (strlen(stp_get_resolution(img.v)) == 0)
+ stp_set_resolution(img.v,
+ stp_printer_get_printfuncs(printer)->
+ default_parameters(printer, NULL, "Resolution"));
+ if (strlen(stp_get_dither_algorithm(img.v)) == 0)
+ stp_set_dither_algorithm(img.v, stp_default_dither_algorithm());
+ }
+
+ img.total_bytes = (double) ((ph.n_chan * ph.bps * ph.width + 7) >> 3)
+ * (double) ph.height;
+ img.bytes_left = img.total_bytes;
+
+ stp_set_app_gamma(img.v, (float)1.7);
+ stp_set_cmap(img.v, NULL);
+ stp_set_scaling(img.v, (float)-img.xres); /* resolution of image */
+ stp_set_output_type(img.v, img.output_type);
+ stp_set_page_number(img.v, page);
+ stp_set_job_mode(img.v, STP_JOB_MODE_JOB);
+ STP_DEBUG(stp_dbg("about to print", img.v));
+ if (stp_printer_get_printfuncs(printer)->verify(printer, img.v))
+ {
+ if (page == 0)
+ stp_printer_get_printfuncs(printer)->start_job(printer, &si, img.v);
+ stp_printer_get_printfuncs(printer)->print(printer, &si, img.v);
+ }
+ else
+ {
+ fprintf(stderr, _("Bad parameters; cannot continue!\n"));
+ status = -1;
+ break;
+ }
+
+ while (img.bytes_left)
+ {
+ status = image_next_row(&img);
+ if (status)
+ {
+ fprintf(stderr, _("Get next row failed at %.0f\n"),
+ img.bytes_left);
+ break;
+ }
+ }
+
+ image_finish(&img);
+ page++;
+ }
+ while (status == 0);
+ stp_printer_get_printfuncs(printer)->end_job(printer, &si, img.v);
+
+ if (f)
+ {
+ fclose(f);
+ }
+
+ if (status > 0)
+ status = 0; /* normal exit */
+
+ ijs_server_done(img.ctx);
+
+ STP_DEBUG(fprintf (stderr, "server exiting with status %d\n", status));
+ return status;
+}