ippsc (Sat Oct 25 2014 01:31:01)

ippsc

IPPSC converts plain text file to a simple PostScript or PDF file.

Note the 'simple' : it is NOT a full in-line markup -> PostScript/PDF
translator. It is used mainly for non-precision work like proof printing.

It either leaves the output files in an output queue, sends them to a printer
using 'lpr' or routes them back to spool/2go for further distribution.

The original files are normally deleted.

The FipHdr field 'DF' is used to find a parameter file in tables/setup.

In the data a series of markup commands can be used to modify the presentation
of the text. These commands use a start escape chr (and an optional trailing
end chr or size too).

Modes. pointsize and leading can be interpreted from in-line markup or escape
codes. {M0 - start mode 0 - can be used to switch a particular PDF/PostScript
font.

These escape strings have the format (presy chr) (type letter) (numbers).
The presy is normally a '{' but can be changed in the parameter file.
The numbers may be decimals.
The type letter is case IN-sensitive and is :
		'm' for mode or font
		'p' for pointsize
		'l' for leading
		'c' for approximate column width
		'z' for a raw postScript command to pass through to the data
The end of an escape string is EITHER an (endpresy chr) or a non-digit or dot.
If the endpresy is used, it is stripped while any other chr is left in the
text.

100 mode/font switches are catered for in the range {m0 to {m9999999 unless
restricted by the modesize: parameter which states the number of digits the
font can be in the incoming data.
Modesize is especially useful where Font changes do NOT have a trailing end Chr
(like a '}').

You MUST use a 'endpchr' to define an endpresy  chr if using PASSTHRUS.

Pointsize, defaults to 9pt, can be changed with {p22} or {p9.9}

Setsize (ie the width of the characters), if different from pointsize, can be
changed with 's' keyword - {p32}{s21} will produce 32pt text with a width of 21
(which will normally look awful!).

Note that a 'p' for pointsize will automatically reset the setsize at the same
time; so the sequence must always be to change pointsize then setsize - eg
{p12}{s11} is fine while {s11}{p12} will ignore the 's11'.

The PDF/PostScript output file is just left in the output queue (spool/pscdone
by default). Normally an 'lpr' is added as a 'script' parameter. In any case,
please remember to purge the output queue in the nightly purge or whenever
appropiate.

The parameter file in tables/setup is normally called POSTSCRIPT or PDF if the
-PDF input swith is set. It has the following parameters :

	; comment line is preceeded by a semi-colon.
	font: (unique number) (Font Name)
		Map a mode to this PDF/PostScript name. There can be up to 100 fonts
		The name must be EXACTLY that which is used by your Rip.
		The number must be unique but the name can be duplicated.
		eg:	font:6	Frutiger-Bold
		If there is a Font with a number of Zero, this is assumed to be the
		font to use for the beginning of data.
	deffont: (unique number) (Font Name)
		Actual PDF/PostScript name of the font to use as default.
		The font number should be unique and not used by any other but the name
		can duplicated another font.
		The default font is used for banners and headings.
		eg :	deffont:9999	Helvetica
		The default default is no.9999 name.Times-Roman
	pdfhdr: (file name)
	pshdr: (file name)
		The PostScript Header file in tables/setup
		The default is PSHDR for PostScript and PDFHDR for PDF.
		pshdr:normal
	pdftlr: (file name)
	pstlr: (file name)
		The PostScript Trailer file in tables/setup
		The default is PSTLR for PostScript and PDFTLR for PDF.
		pstlr:3copies
	pdfinclude: (file name)
	psinclude: (file name)
		An optional PostScript Include file in tables/setup
		There is no default. Use this to add specifics for this job
		such as postscript routines for drawing boxes, circles etc.
		psuser:LH_USERS
	margin: (left hand indent)
		The Left hand margin in points. The default is 12pt.
		margin:24
	top:	(space at the top of the page)
		The Space at the top of the page in points. The default is 12pt.
		top:24
	width:	(page width)
		Page width of the output printer in points.
		This defaults to 576 for 8 inches of 72 points per inch.
		width:792		A3 width
	depth:	(page depth)
		Page Depth of the output printer in points.
		This defaults to 792 for 11 inches of 72 points per inch.
		depth:1152		A3 depth
	defpoint: (PointSize)
		Default pointsize - normal value is 9pt.
		defpoint:22
	defset: (SetSize)
		Default setsize - normal value is 9pt.
		defset:22
	deflead: (leading in points)
		Default leading - normal value is 9pt.
		deflead:16
	newname: (FipSeq)
		Derive a new name for the output file using FipSeq.
		newname:SN.$j		for name with a julian date extension
	script: (script name)
		Run a script against the output file when finished.
		If you are not sure whether the script is in you path,
		specify the full path name. The name of the output file is
		given as the last parameter to the script.
			script:/usr/ucb/lpr -h -r -P QS
		or	script:/fip/local/printit
		This script is parsed so may contain FipSeq :
		script:/fip/local/printit "ZO" "PG"
		The actual file is the last parameter - $3 in this case.
		Always quote parameters if there is a chance of nothing in the field.
		To strip quotes in a script use 'sed' :
			new2=`echo $2 | sed /"//g`
	banner: (FipSeq banner)
		Custom heading for the top of Page 1.
		banner:Printed at $h:$n $d-$m-$y, File SN-AQ-QG Page.1
		default is "File.(newname)   Page.1	(Date Time)"
		Note that the newname is added as PN.
		Remember to stick a NL at the end of the line if needed - n.
		If several lines are required, add n where you need.
	nobanner:
		Do NOT add a banner.
	page: (FipSeq page top)
		Custom heading for Page 2 and all following pages.
		page:Continuation of File SN-AQ-QG Page.PX
		default is "File.(newname)   Page.(pageno)   (Date Time)"
		Note that the newname is added as 'PN' and page as 'PX'.
		Remember to stick a NL at the end of the line if needed - 'n'.
		If several lines are required, add 'n' where you need except
		preceding end-of-lines are ignored.
	nopage:
		Do NOT add a page top.
	endpage: (FipSeq page ending or continuation line)
		Custom continuation line for the bottom of Page 1 
			and all following pages.
		eg	endpage:...File Continues
		The default is NOT to print anything.
		The text from this prints in the end zone NOT in the data part.
		Preceeding end-of-lines 'n' are ignored.
	fini: (FipSeq end of documuent)
		Custom End-of-document string.
		fini:-fini-
		default is "ttt--- end ---"
		Preceeding end-of-lines 'n' are ignored.
	nofini:
		Do NOT add an end of document.
	pchr:   (FipSeq chr)
		Escape precedence chr in place of the default '{'
		for changing fonts, pointsize and leading ( {m0, {p5.5)
		pchr:~		or pchr:377
	endpchr:  (FipSeq chr)
		End of Escape precedence chr in place of the default '}'
		for changing fonts, pointsize and leading ( {m0, {p5.5)
		endpchr:|	or endpchr:11
	modesize: max number of digits in a mode change where there is no endpchr,
		eg if modesize:2, then {m8755.. will change to font 87 and output 55...
		otherwise it will change to font 8755 and output ..
		default is unlimited size.
	bboxx:	Bounding Box width of whole document
	bboxy:	Bounding Box depth of whole document
		Normally the bounding box of the output PDF/PostScript file is set to
		unknown (ie ? ? ? ?) which is fine for most printers.
		But if you are going to embed the file(s) in another document, it will
		need to know what the dimemsions it really are. The problem is that
		'ippsc' knows only the printable area, not the bounding box - so you
		have to tell it.  The values are in whole points.
		eg for A4 page		bboxX:595
							bboxY:842

	log-line: Custom log line
	logeachfile:(dest) Send a Success/failed msg to this destination for each
file.
			There is no default.
			This log file is just a FipHdr with the following extra fields :
				DR-File Sent OK	 DR:ok or DR:error
				DG-Will Retry later	DG:retrying or DG:stopped
				DT-Some message text	DT:No connection
				DO-Number of last attempt	DO:5
				HT-Date and Time	HT:25 Nov 98 15:35:25
			default: no log created.
			The DR and DG messages can be changed by using :
				log-dr-ok:(FipSeq)
				log-dr-error:(FipSeq)
				log-dg-stop:(FipSeq)
				log-dg-retry:(FipSeq)
			eg: log-dr-ok:File VN Printed ($h:$n)
	msgeachfile:(FipSeq) Additional information to add to the FipHdr of the
'logeachfile'
			msg. This should be in FipHdr format and be in FipSeq. It can be
			used to pass FipHdr fields in the outgoing file into the log file.
			eg	msgeachfile:	DF:logdialnSS:SSn
			default: nothing added
	logo-file: Filename of an EPS logo (in FipSeq)
	logo-x:	X position of the bottom left of the EPS
	logo-y:	Y position of the bottom left of the EPS
	logo-type:	Type of logo
			'every'	logo is on every page
			'first'	logo is on first page only
			'other'	logo is on all pages after the first
			'cover'	logo is on the cover page only
			The default is 'every'.
			Note that these are additional - the first page may have
			logos under type:first and type:every.
	There can be up to 9 logos per type of page by specifying :
		logoZ-name, logoZ-x, logoZ-y and logoZ-type
		where Z is 1 to 9
		eg	logo7-x:

	If you specify one or more logos, you will also need to adjust the
	printable area using -
	first-page-top:	Y position of the start of text (overrules 'top:')
	first-page-depth: depth of text (overrules 'depth:' if a logo exists)
	every-page-top:	Y position of the start of text (overrules 'top:')
	every-page-depth: depth of text (overrules 'depth:' if a logo exists)
	other-page-top:	Y position of the start of text (overrules 'top:')
	other-page-depth: depth of text (overrules 'depth:' if a logo exists)

	cover-sheet:	FipSeq for a cover sheet banner
	cover-page-top:	Y position of the start of text (overrules 'top:')
	cover-page-depth: depth of text (overrules 'depth:' if a logo exists)
	
	epsf-path:	Path to where Logos etc are held.	default: /fip/tables/logos
	opi-stub-file: If the EPSFs are really OPI includes, this is the stub file
			holding the actual ALDUS include statements.	default:none 

	All the logos, x and y can be in FipSeq if the data is held in FipHdr fields
of the incoming data. X and Y are in points and default to 0. There is no
default logo names.
		eg	logo6-file:/fip/tables/logos/WL
			logo6-x:0
			logo6-x:QY
			combie:QY	WY,300
		This places the logo named in FipHdr WL at posn x0, y either whatever is in
WY or 300.

Where parameter fields can be FipSeq, the usual optional, combie, repeat,
style, newdate and partial fields are available (see System Admin Guide for
more information on FipSeq)

Input Switches, all optional :
	-1 : filename for a single shot			default: spooled
		In this case the input file is NOT deleted and the program
		stops after processing the file.
	-PDF : output PDF		default: postscript
	-i : input queue to scan	default: spool/2psc if postscript
					default: spool/2pdf if pdf
	-o : output queue for postscript files.		default: spool/pscdone
	-l : do NOT log outgoings			default: log outgoing
	-y : fipHdr field to use for the 		default: DF
		parameter file
	-d : done queue for sent files			default: none
		Normally files are deleted after sending.
	-T : log the trace of each transaction		default: do not
		This generates a one line log of each file sent is stored in
		log/remote_trace with a name of 'date_(DF)'.
	-z : name of default parameter file in tables/setup
					default: POSTSCRIPT or PDF
	-Z : folder for parameter files		default: /fip/tables/setup
		Use this to organise lots of parameters files.
			eg -Z setup/psc
	-v : version no and stop

Just one note ... Sometimes - at random - you may get the font change not
working. Stop 'ippsc' and resend a file that generates the problem. The bet is
that the font change - something like {M8 - is actually just in front of some
other numbers like :
	{M812 days of Christmas
So either use a 'modesize' to restrict the number of digits (if possible) or
add and 'endpchr' to finish it. What you want is :
	{M8}12 Days of Christmas

(copyright) 2014 and previous years FingerPost Ltd.