PressConverters.mesa
Copyright Ó 1987, 1992 by Xerox Corporation. All rights reserved.
Pier, September 21, 1987 5:29:39 pm PDT
Jean-Marc Frailong January 20, 1988 12:09:37 pm PST
gbb November 15, 1988 1:51:40 pm PST
Willie-s, July 22, 1992 12:34 pm PDT
DIRECTORY
Commander, Imager, ImagerInterpress, IO, Rope;
Client interface to Interpress files
ProgressProc:
TYPE ~
PROC [pageNumber:
INT, totalPages:
INT]
RETURNS [stop:
BOOL ¬
FALSE];
Call after generating a page for feedback purposes. If totalPages<=0, unknown final master size. If returns TRUE, converter may stop. Converters to IP masters have to such callback procs, called respectively just before starting a page and just after finishing it.
PressToInterpress:
PROC [inputName: Rope.
ROPE, interpress: ImagerInterpress.Ref, beginPage, endPage: ProgressProc, msg:
IO.
STREAM, useXCFonts:
BOOL, verbose:
BOOL]
RETURNS [failed:
BOOL ¬
FALSE];
Convert press file to IP file. useXCFonts=TRUE means translate fonts to use XC encoding conventions and fonts (required if IP version <3.0). Verbose=TRUE means log font substitutions. Print various feedbacks onto msg (don't print anything if msg is NIL). Supports any IP master version. There is no provision to modify the page size definition. The IP master is not closed on completion.
Client interface from Interpress files
IPReadError:
ERROR [class:
INT, code:
ATOM, explanation: Rope.
ROPE];
Raised in all procs that read IP masters and have no message stream when the error is not trivial (# classMasterWarning, classAppearanceWarning, classComment)
InterpressToPress:
PROC [inputName: Rope.
ROPE, context: Imager.Context, beginPage, endPage: ProgressProc, msg:
IO.
STREAM]
RETURNS [failed:
BOOL ¬
FALSE];
Convert IP file to press file described by an Imager context (obtained through ImagerPress.SimpleCreate). Errors are logged on msg if present, otherwise they are not caught. Return TRUE if anything went wrong. The press file is not terminated on exit, so that IP masters may be concatenated into a single press file.
Command interface
ActionProc:
TYPE ~
PROC [inputName: Rope.
ROPE, outputName: Rope.
ROPE, cmd: Commander.Handle, cmds:
IO.
STREAM];
Command: Commander.CommandProc;
PressToInterpressAction: ActionProc;
InterpressToPressAction: ActionProc;