DIRECTORY ImagerSample USING [RasterSampleMap], IO USING [STREAM], PDFileFormat USING [Herald, Run, StartImage], Rope USING [ROPE]; PDFileReader: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Handle: TYPE ~ REF Rep; Rep: TYPE ~ RECORD [ herald: PDFileFormat.Herald, image: PDFileFormat.StartImage, bandNumber: CARDINAL, sMinBand: CARDINAL, sSizeBand: CARDINAL, colorType: ColorType, colorTileLoadAddress: INT, priority: INT, loadWords: INT, private: REF, stream: IO.STREAM, warningCount: INT ]; ColorType: TYPE ~ {none, clear, ink, opaqueTile, transparentTile}; Error: ERROR [handle: Handle, code: ErrorCode, wordIndex, wordCount: INT, description: ROPE]; Warning: SIGNAL [handle: Handle, code: ErrorCode, wordIndex, wordCount: INT, description: ROPE]; ErrorCode: TYPE ~ { invalidPassword, objectOutOfBounds, missingStartImage, badLoadReference, unrecognisedImagingCommand, loadOutOfBounds, unrecognisedControlCommand, unrecognisedCommandType, unexpectedEOF, wrongFormatVersion, unreasonableResolution, unreasonableBandSSize, unreasonableImageSize, unreasonableLoadSize, unreasonableNumberOfCopies, objectOutOfBand, emptyRunGroup, nonZeroFill, imageBoundsExceedPageBounds, tooFewBands, unknownColorTileFlag }; Open: PROC [fileName: ROPE] RETURNS [Handle]; FromStream: PROC [stream: IO.STREAM] RETURNS [Handle]; Close: PROC [handle: Handle]; Get: PROC [handle: Handle, scanning: BOOLEAN _ FALSE] RETURNS [REF]; Keep: PROC [handle: Handle, ref: REF] RETURNS [REF]; ColorTileFromLoad: PROC [handle: Handle, colorTileLoadAddress: INT] RETURNS [colorTile: ImagerSample.RasterSampleMap, phase: CARDINAL]; MaskRectangle: TYPE ~ REF MaskRectangleRep; MaskRectangleRep: TYPE ~ RECORD [ sMin, fMin, sSize, fSize: CARDINAL ]; MaskTrapezoid: TYPE ~ REF MaskTrapezoidRep; MaskTrapezoidRep: TYPE ~ RECORD [ sMin, fMin, fMinLast, sSize, fSize, fSizeLast: CARDINAL ]; MaskRunGroup: TYPE ~ REF MaskRunGroupRep; MaskRunGroupRep: TYPE ~ RECORD [ sMin, fMin, sSize, fSize: CARDINAL, fOffset: CARDINAL, -- add this to fMin of each run runCount: INT, -- number of runs pointer: LONG POINTER TO PDFileFormat.Run, loadAddress: INT, -- -1 if not in the load ref: REF -- for garbage collection hacks ]; MaskSamples: TYPE ~ REF MaskSamplesRep; MaskSamplesRep: TYPE ~ RECORD [ loadAddress: INT, -- -1 if not in the load samples: ImagerSample.RasterSampleMap ]; ColorSamples: TYPE ~ REF ColorSamplesRep; ColorSamplesRep: TYPE ~ RECORD [ samples: ImagerSample.RasterSampleMap ]; DeviceCommand: TYPE ~ REF DeviceCommandRep; DeviceCommandRep: TYPE ~ RECORD [ SEQUENCE wordCount: NAT OF CARDINAL ]; StateChange: TYPE ~ REF StateChangeRep; StateChangeRep: TYPE ~ RECORD [ whatChanged: WhatChanged, loadChangeStart, loadChangeLength: INT ]; WhatChanged: TYPE ~ { imageStart, imageEnd, priorityChange, colorChange, bandChange, loadChange, documentEnd }; END.  PDFileReader.mesa Copyright Σ 1984, 1985, 1987 by Xerox Corporation. All rights reserved. Michael Plass, February 6, 1987 7:19:16 pm PST Ken Pier, December 13, 1983 12:06 pm Doug Wyatt, March 7, 1985 2:34:08 pm PST Handle definition Errors and Signals Client may use handle.stream to read the offending data. errors: warnings: File control May raise FileIO.OpenFailed, PDFileReader.Error, or PDFileReader.Warning May raise PDFileReader.Error or PDFileReader.Warning Reading operations Returns one of the data types below May raise PDFileReader.Error or PDFileReader.Warning IF scanning=TRUE, large GetBlocks will not be done for runs, loads, ... Normally, storage returned by a call on Get is subject to re-use on later calls. Calling Keep prevents re-use of the specified storage. Storage for colorTile descriptor comes from the scratch pool; use ImagerSample.ReleaseDescriptor to discard. Data types returned by Get Κά˜code™KšœH™HK™.K™$K™(—K™šΟk ˜ Kšœ œ˜%Kšœœœ˜Kšœ œ˜-Kšœœœ˜—K˜KšΠbl œœ ˜šœ˜K˜Kšœœœ˜—head™Kšœœœ˜šœœœ˜Kšœ˜Kšœ˜Kšœ œ˜Kšœ œ˜Kšœ œ˜K˜Kšœœ˜Kšœ œ˜Kšœ œ˜Kšœ œ˜ Kšœœœ˜Kšœ˜Kšœ˜K˜Kšœ œ3˜B—K˜—™šΟnœœ9œœ˜]K™8—KšŸœœ9œœ˜`šœ œ˜™Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜K˜—™ Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ ˜ Kšœ˜Kšœ ˜ Kšœ˜—Kšœ˜—K˜—™ šŸœœ œœ ˜-KšœH™H—š Ÿ œœ œœœ ˜6Kšœ4™4—KšŸœœ˜K˜—™š Ÿœœœœœ˜DK™#Kšœ4™4K™G—š Ÿœœœœœ˜4Kšœˆ™ˆ—š Ÿœœ(œœ2œ˜‡Kšœl™l——™šœœœ˜+šœœœ˜!Kšœ˜"Kšœ˜——šœœœ˜+šœœœ˜!Kšœ/˜7Kšœ˜——šœœœ˜)šœœœ˜ Kšœœ˜#Kšœ œΟc˜2Kšœ œ ˜ Kšœ œœœ˜*Kšœ œ ˜*Kšœœ ˜(Kšœ˜——šœ œœ˜'šœœœ˜Kšœ œ ˜*Kšœ%˜%Kšœ˜——šœœœ˜)šœœœ˜ Kšœ%˜%Kšœ˜——šœœœ˜+šœœœ˜!Kšœ œœ˜#Kšœ˜——šœ œœ˜'šœœœ˜Kšœ˜Kšœ#˜&Kšœ˜—šœ œ˜KšœV˜VKšœ˜——K˜—Kšœ˜—…— 