2 % Version 3.3.2 prologue for DMD bitmap files.
18 /pagebbox [0 0 612 792] def
20 /inch {72 mul} bind def
21 /min {2 copy gt {exch} if pop} bind def
24 counttomark 2 idiv {def} repeat pop
26 landscape {/orientation 90 orientation add def} if
29 xcenter ycenter translate
30 orientation rotation mul rotate
31 xoffset inch yoffset inch translate
32 magnification dup aspectratio mul scale
34 /height height margin sub def
35 /width width margin sub def
40 /pagebbox [clippath pathbbox newpath] def
43 4 -1 roll exch 4 1 roll 4 copy
44 landscape {4 2 roll} if
47 add 2 div /xcenter exch def
48 add 2 div /ycenter exch def
49 userdict /gotpagebbox true put
52 /pagesetup {/page exch def} bind def
60 /bytelength scanlength 8 idiv def
61 /picstr bytelength string def
62 /lpicstr bytelength string def
63 /bytelength bytelength 1 sub def
67 % First the overall scaling.
69 height scanlines div width scanlength div min
73 % Followed by the one for the unit square.
75 scanlength neg 2 div scanlines neg 2 div translate
76 scanlength scanlines scale
77 v8format {getv8bitmap} {getbitmap} ifelse
82 scanlength scanlines flip [scanlength 0 0 scanlines neg 0 scanlines] {
84 currentfile token pop dup
85 0 eq {pop pop exit} if
87 picstr 1 index charcount getinterval
89 currentfile repl readhexstring pop pop
91 currentfile token pop {
92 picstr 1 index repl putinterval
101 scanlength scanlines flip not [scanlength 0 0 scanlines neg 0 scanlines] {
103 currentfile token pop dup
104 0 eq {pop pop exit} if
106 picstr 1 index charcount getinterval
108 currentfile repl readhexstring pop pop
110 currentfile token pop {
111 picstr 1 index repl putinterval
116 exch lpicstr exch get xor
117 lpicstr exch 2 index exch put
124 /done {/lastpage where {pop lastpage} if} def