Settings Help
CTAN
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/dviware/dvipsconfig

Release 1.6   11 May 2006	Added mmgrid and a4grid, millimetre grids.
Release 1.5   02 Aug 2000	Added addpsctrl, a filter program which can add
				these control instructions to already existing
				PostScript files.
				Added US ledger paper.
Release 1.4   22 Mar 2000	Added tray selection.
				Thanks to Steffen Klupsch for suggesting it.
Release 1.3.2 09 Mar 2000	License change only. Modified README.
Release 1.3,  19 Feb 1999
Release 1.2,  25 Jan 1998
Release 1.13, 21 Aug 1995
Release 1.12, 02 Mar 1995
Release 1.0,  20 Feb 1995


OVERVIEW
========

This is a set of PostScript header files which can be used to control the
printer, like simplex/duplex printing, or the printing, like screen frequencies
of images, or the addition of a grid underlay. These header files work with
dvips, and can also be inserted with the addpsctrl script into existing
PostScript files.

Put together by Volker Kuhlmann <VolkerKuhlmann@gmx.de>.
This collection of files is available under the name of "dvipsconfig" from

	ftp://dante.ctan.org/tex-archive/dviware/dvipsconfig/

or from any other CTAN host under the same path.
Alternatively, from:

	http://volker.dnsalias.net/soft/texmf/

This software is copyright (C) Volker Kuhlmann, and is freely distributable
under the terms of the GNU General Public License version 2.
Parts of the code in config.psgrid are derived from previous material and are
distributed with permission. See the file for details.


LIST OF FILES
=============

README		This file.
addpsctrl	Shell script which inserts these printer control files into
		into already existing PostScript files (can also be used by
		print filters)
config.*        Configuration files *and* header files for dvips.
		Special format where each file serves both purposes.


INSTALLATION
============

Copy addpsctrl into a directory which is searched for executable programs.

Copy README and all config.* into a directory which is searched by dvips both
for configuration files AND for header files. Each of these files have a dual
function (easier maintenance) and hence must be found under each category
(dvips config and dvips header).

For current installations of web2c respectively teTeX 1.x, consult the file
texmf.cnf for search paths. Currently configured search paths can be displayed
with 
	kpsewhich --show-path "dvips config"
	kpsewhich --show-path "PostScript header"

To check up whether the place was any good, run (both!)
	kpsewhich --format "dvips config" config.duplong
	kpsewhich --format "PostScript header" config.duplong
and don't forget to run mktexlsr...
In case of problems, also check for any .dvipsrc files.

dvips(k) 5.78 kpathsea version 3.2, web2c 7.2, looks in $TEXCONFIG and
$TEXPSHEADERS.

dvips (dvipsk 5.58f, web2c 6.2) looks in $TEXCONFIG for configuration files,
and in $DVIPSHEADERS for header files. For details please see the dvips
documentation (environment variable use seems to change with dvips versions).


USAGE
=====

dvips reads the instructions in a configuration file <configfilename>
with the -P option:

	dvips -P <configfilename> ...

All these configuration files contain the PostScript code for the
respective operation as well, and can be used as header file as they are.

Now to the material provided:

Duplex printing:
---------------

-P simplex      On a duplex printer, force printing in simplex mode.
		On a simplex printer, this will be ignored.

-P duplong      On a duplex printer, force duplex printing with binding
		on the long edge.
		This is what you want for e.g. an A4 upright book.
		On a simplex printer, this will be ignored.

-P dupshort	On a duplex printer, force duplex printing with binding
		on the short edge.
		Useful for e.g. printouts in landscape.
		On a simplex printer, this will be ignored.

Paper size selection:
--------------------

-P a3		Switch the printer to use A3 paper.
		Note: "-t a3" must still be used as well!
		Only works with PS level 2 devices, ignored otherwise.

-P a4		Switch the printer to use A4 paper.
		Note: "-t a4" must still be used as well, unless it is
		the default.
		Only works with PS level 2 devices, ignored otherwise.

-P usletter	Switch the printer to use US letter paper.
		Note: "-t letter" must still be used as well, unless it
		is the default.
		Only works with PS level 2 devices, ignored otherwise.

-P usledger	Switch the printer to use US usledger paper.
		Note: "-t ledger" must still be used as well, unless it
		is the default.
		Only works with PS level 2 devices, ignored otherwise.

Screen frequencies and dot functions:
------------------------------------

-P screenN	Print images with a screen frequency of N lpi at
		45 degrees with the "dot" spot function. 
		N = {35, 50, 70, 80, 85, 90, 100, 110, 120, 130, 140, 150}

-P screen100_0	Print images with a screen frequency of 100lpi
		at 0 degrees with the "dot" spot function.
		A 0 degree screen angle is only useful as illustration!

Note:   When working with screen frequencies, it is possible that
	turning the printer off and back on solves the problem of the
	screen commands not having any effect. Previous print jobs may
	leave the printer in a different state.

Colour printer media selection:
------------------------------

-P tek550paper	Switch Tektronix 550 and 560 colour printers to print on paper.

-P tek550transparency	Switch Tektronix 550 and 560 colour printers to print
			on transparency.

Paper tray selection:
--------------------

-P manualfeed	Print on paper from the manual feeder.
		The printer waits for the paper to be loaded after receiving
		the job.
		This should work with almost any printer.

-P envelope	Print on paper from the envelope feeder.
		This should at least work with most HP laser printers.

-P tray1	Print on paper from "tray 1".
		This often is the manual feeder / upper tray / multipurpose
		tray (at least for HP laser printers).

-P tray2	Print on paper from "tray 2".
		This often is the lower tray (at least for HP laser printers).

-P tray3	Print on paper from "tray 1".
		This often is the large capacity / lower cassette (at least for
		HP laser printers).

Note: Tray selection is very printer-dependent. tray1..3 will not work for all
printers. Possible effects of them if the tray doesn't exist, or if the command
is simply wrong for the printer, include the print job being cancelled, or at
best the command being ignored. Email me with any problems and I might be able
to fix it - I don't have that many printers for testing :-)

Reported behaviour:
  HP Laserjet 5M, -P envelope: print job cancelled if tray doesn't exist.
  HP Laserjet 4000N, -P envelope and -P tray3 don't exist: job is printed on 
	paper from the standard tray instead.

Thanks to Steffen Klupsch <steffen@vlsi.informatik.tu-darmstadt.de> for initial
suggestions about the tray selection material, and some beta testing.

Misc:
----

-P psgrid	Print a PostScript coordinate grid onto the page. This can be
		very useful for checking by how much the printer shifts the
		image on the paper, or to check whether things end up in the
		correct place.

-P mmgrid	Print a millimetre grid onto the page. Much more userfriendly.
		Otherwise the same as -P psgrid.

-P a4grid	Print a millimetre grid onto the page, starting in the top-left
		corner. Much more useful for checking page layout.

-P inv          Print all pages inverted, i.e. white letters on black
		background.
		Note: this currently does not work properly. Any
		      hints/fixes greatly appreciated!


CONTROLLING SCREEN FREQUENCIES
==============================

Various PostScript commands for controlling the screen frequencies of
images exist, but not all work on all printers. See fragments of
PostScript code and comments below. The form working on most printers is

	LPI DEGREES {FUNCTION} setscreen

Insert numbers for LPI and DEGREES, and a function for FUNCTION about
which I only know (right or wrong?):

	"Should read 2 values from the stack (x, y coordinates in a
	halftone cell), and return one in the range -1 to 1. The return
	values determine the order in which pixels within a halftone
	cell are whitened to produce any desired shade of gray."

The simplest function is {pop}, creating a "linescreen" pattern. There
is also a function "Dot" (currently used) and "Ellipse". For any other
frequencies/angles/functions put the instructions in a file, and load
the file with

	dvips -h <filename>

Thanks to osakari@unda.fi (Olavi Sakari) for some help, and the "Dot"
and "Ellipse" code.

Notes follow:


%currentscreen 3 1 roll pop pop 70 45 3 -1 roll setscreen
% Works on HP LJ3Si, HP LJ4m. Ignored on HP LJ4mv (VK).


%currentscreen 3 1 roll pop pop 70 45 3 -1 roll sethalftone
% Ignored on HP LJ4mv (VK).


%70 45 {pop} setscreen
% Produces a funny, 1-diagonal pattern ("linescreen") on HP LJ4mv (VK).


% "Dot":
%70 45 {abs exch abs 2 copy add 1 gt {1 sub dup mul exch 1 sub dup mul add 1
%    sub }{dup mul exch dup mul add 1 exch sub }ifelse} setscreen
% Works on HP LJ3Si, HP LJ4m, HP LJ4mv (VK).


% "Ellipse":
%70 45 {dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub} setscreen
% Works on HP LJ4mv (VK).


%70 45
%<<
%     /HalftoneType 1
		%  0 gives range check error, 2 gives undefined error (VK).
%     /Frequency 150
%     /Angle 20
		% the values for /Frequency, /Angle are irrelevant
%     /SpotFunction {pop}
%>>
%setscreen	
% 70 45 seem to replace /Frequency and /Angle in dict
% - Note: NO curly braces around the dict!
% Works on HP LJ4m, produces errors with HP LJ3Si, 
% Produces "linescreen" on HP LJ4mv caused by {pop} (VK).


%<<
%     /HalftoneType 1
%		%  0 gives range check error, 2 gives undefined error (VK).
%     /Frequency 70
%     /Angle 45
%     /SpotFunction {pop}
%>>
%sethalftone  % Level 2 only
% Produces "linescreen" on HP LJ4mv caused by {pop} (VK).


ADDPSCTRL
=========

The addpsctrl program works as a filter. The given controls are inserted into
the PostScript data. The config.* files are located by running kpsewhich, or
by specifying the directory they're in. This allows to use addpsctrl without
having to have a TeXMF installation. For further info run addpsctrl --help.


TODO
====

Control the screen frequency without altering the dot function.

Supply separate controls for setting the dot function.

Files

Name Size Date Notes
README 10268 2006-05-11 02:00:00
addpsctrl 7137 2006-01-26 01:00:00
config.a3 1544 2006-05-11 02:00:00
config.a4 1478 2006-05-11 02:00:00
config.a4grid 5497 2006-05-11 02:00:00
config.duplong 1482 2006-05-11 02:00:00
config.dupshort 1425 2006-05-11 02:00:00
config.envelope 1925 2006-05-11 02:00:00
config.inv 929 2006-05-11 02:00:00
config.manualfeed 1220 2006-05-11 02:00:00
config.mmgrid 5248 2006-05-11 02:00:00
config.psgrid 4752 2006-05-11 02:00:00
config.screen100 975 2006-05-11 02:00:00
config.screen100_0 981 2006-05-11 02:00:00
config.screen110 975 2006-05-11 02:00:00
config.screen120 975 2006-05-11 02:00:00
config.screen130 975 2006-05-11 02:00:00
config.screen140 975 2006-05-11 02:00:00
config.screen150 975 2006-05-11 02:00:00
config.screen35 978 2006-05-11 02:00:00
config.screen50 978 2006-05-11 02:00:00
config.screen70 969 2006-05-11 02:00:00
config.screen80 969 2006-05-11 02:00:00
config.screen85 969 2006-05-11 02:00:00
config.screen90 969 2006-05-11 02:00:00
config.simplex 1429 2006-05-11 02:00:00
config.tek550paper 1426 2006-05-11 02:00:00
config.tek550transparency 1468 2006-05-11 02:00:00
config.tray1 1959 2006-05-11 02:00:00
config.tray2 1923 2006-05-11 02:00:00
config.tray3 1944 2006-05-11 02:00:00
config.usledger 1583 2006-05-11 02:00:00
config.usletter 1516 2006-05-11 02:00:00

Down­load the com­plete con­tents of this di­rec­tory in one zip archive (34.9k).

dvip­scon­fig – Col­lec­tion of dvips PostScript head­ers

This is a col­lec­tion of dvips PostScript header and dvips con­fig files. They con­trol cer­tain fea­tures of the printer, in­clud­ing: A4, A3, uslet­ter, sim­plex, du­plex / long edge, du­plex / short edge, screen fre­quen­cies of im­ages, black/white in­vers, se­lect trans­parency / pa­per for tek­tronix 550/560, man­ual feeder, en­ve­lope feeder, and tray 1, 2 and 3, and print­ing a PostScript grid un­der­neath the page ma­te­rial—very use­ful for mea­sur­ing and elim­i­nat­ing pa­per feed er­rors!

Doc­u­men­ta­tion
Ver­sion1.6
Li­censeGNU Gen­eral Public Li­cense
Main­tainerVolker Kuhlmann
Con­tained inTeXLive as dvip­scon­fig
Topics con­vert DVI files for (di­rect) print­ing, etc.
Guest Book Sitemap Contact 2014-04-21 16:42 CEST