%!PS %% attempts to read random flate objects % AN ACROBAT FLATE COMPRESSED OBJECT FILE VIEWER % ============================================== % by Don Lancaster % Copyright c 2002 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available http://www.tinaja.com/info01.html % Linking welcome. Reposting expressly forbidden. % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 1.3 % This is an interactive "bare matal" PostScript utility that allows you to inspect % and view the contents of PDF Acrobat Flate compressed stream objects. Only the % first 5000 recovered characters of a stream < 65K are returned in this version. % See GuruGram #8 http://www.tinaja.com/gurgrm01.asp for additional use details. % whose filename is http://www.tinaja.com/glib/flatevue.pdf %%%%%%%%%%%%%%%%%%%%%%%% THE VIEWER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (1) Make the PDF file to be viewed locally available. Define the file here. % Be sure to Use DOUBLE reverse slashes any time you mean a single slash.... /sourcefilename (C:\\Documents and Settings\\don 2\\Desktop\\acrobat bug\\retry\\ingood.pdf) def % (2) Make a file to read... sourcefilename (r) file /workfile exch def % make a file to read % (3) Read the file to be viewed to determine the Flate length of the stream. % If the /length appears as 29 0 R, go to object 29 to read the length. % first attempt will be object 17 with length 65 /flatelengthstr 65 string def % set length of compressed stream /reportstring 5000 string def % set length of max reported characters % (4) Read the end PDF xref table to find the offset into the desired object. Object % #28 will be on the twenty-eighth line. /fileposloc 97876 pop 40 def % start of Flate encoded PDF object % (5) Count (or guess and retest) the header characters needed before the first % compressed character. This INCLUDES the last carriage return. /fileheaderoffset 87 def % first ACTUAL Flate character position % (6) Temporarily block the file read until you are sure you actually start on the % first flate character. Note there should NOT be a carriage return between the % opening paren and the start of the actual Flate characrers. /oktodecompress true def % set to true after position is correct % (7) Send this file to Acrobat Distiller. VIEW THE RESULTANT LOG FILE. Make sure % the file position is correct before setting /oktodecompress to true. % 21 0 obj xrefs to 656 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 19 0 obj /actualstart 7433 store /flatelength 380 def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /makestring {dup length string dup /NullEncode filter 3 -1 roll {1 index exch write} forall pop} def workfile actualstart setfileposition % go to start of file workfile 200 string readstring pop print flush % to look at unencoded workfile actualstart setfileposition % go to start of file workfile /FlateDecode filter 2000 string readstring pop print flush % EOF