DIRECTORY ImagerPixelMap USING [PixelMap], PDFileReader USING [Handle, WhatChanged], ViewerClasses USING [Viewer]; PDPageReader: CEDAR DEFINITIONS = BEGIN Handle: TYPE=REF Rep; Rep: TYPE=RECORD [ pixelMap: ImagerPixelMap.PixelMap ]; PageRecRef: TYPE=REF PageRec; PageRec: TYPE=RECORD [ link: PageRecRef, --NIL => end of list type: PDFileReader.WhatChanged, --imageStart or loadChange pageNumber: INT, -- -1 if loadChange index: INT --index in PD file of the startImage or storeLoad command ]; PaintActionProc: TYPE = PROC [self: ViewerClasses.Viewer, whatChanged: REF ANY]; InterpretPage: PROC [handle: PDFileReader.Handle, viewer: ViewerClasses.Viewer, pages: PageRecRef, paintAction: PaintActionProc] RETURNS [ok: BOOLEAN]; GetPageStructure: PROCEDURE [handle: PDFileReader.Handle] RETURNS [PageRecRef, INT]; ResetToPage: PROCEDURE [pdData: REF ANY] RETURNS [PageRecRef]; END. ÒPDPageReader.mesa Last edited by Ken Pier, September 5, 1985 11:08:51 am PDT Interprets one page (may be multiple passes), and ships it out. May raise PDFileReader.Warning or PDFileReader.Error or PDReaderOutput.Error or PDReaderOutput.Abort Returns FALSE upon document end. assumes filestream is available from Handle and Gets can be executed safely scans the PD file and returns a linked list of records which contain the indexes in the file of imageStart or loadChange commands. Allows a client to skip thru the file to a particular page, building the load for that page as needed. The total number of pages is also returned. pdData MUST BE a Preview.PDData a DUMB routine to reconstruct the load for the given page "pageNumber". requires that a page structure has already been built using GetPageStructure and passed in as parameter "pages". Returns a PageRecRef for the page that has been successfully reset to. Returns NIL if pageNumber is not in the pages list. Ê“˜Jšœ™J™:J˜šÏk ˜ Jšœœœ&œ ˜h—unitšÏn œœ œ˜'J˜Jšœœœ˜šœœœ˜Jšœ!˜!J˜—Jšœ œœ ˜šœ œœ˜JšœÏc˜&Jšœ Ÿ˜:Jšœ œŸ˜$JšœœŸ9˜DJ˜—J˜š žœœœ+œœ˜PJ˜—šž œœnœœ˜—J™?Jšœd™dJ™ J˜—šžœ œœœ˜TJšœK™KJ™PJšœŸœ0™WJ™lJ™—š ž œ œ œœœ˜>J™JšœG™GJšœL™LJšœS™SJ™J—J™—Jšœ˜J˜—…—vÛ