Xerox 721P87491 Printer User Manual


 
POSTSCRIPT
2-34 XEROX DOCUPRINT NPS GUIDE TO USING PAGE DESCRIPTION LANGUAGES
Figure 2-13. PostScript with embedded image: reordered data
for optimum scan example
%! PS-Adobe-3.0
% G4.example.ps
% Example using embedded CCITT group 4 (G4) data.
% For optimal printing speeds, the scan data should be aligned with
% the printing orientation, which scans the long edge of the page.
% Fast scan direction for the image is bottom-to-top across the page.
% Slow scan direction for the image is left-to-right down the page.
% To get this data for a normal portrait oriented image, scan it as
% landscape with the original rotated 90 degrees clockwise. This can
% also be done as a post pass on the scan data.
% This scan direction requires no internal rotation for DocuPrint
% printers, although the PostScript code has a 90 degree rotation
% (counterclockwise) to compensate for the rotation performed in the
% scan step.
save
% Rotate to the printer orientation
clippath pathbbox % => 11x 11y urx ury
/maxY exch def
/maxX exch def
/minY exch def
/minX exch def
/centerX maxX minX add 0.5 mul def
/centerY maxY minY add 0.5 mul def
centerX centerY translate
90 rotate
centerY neg centerX neg translate
bpl res div 72 mul lines res div 72 mul scale
bpl lines useMask {false} {1} ifelse
[bpl 0 0 lines neg 0 lines]
currentfile
<<
/Uncompressed false
/K -1
/EndOfLine false
/EncodedByteAlign false
/Columns bpl
/Rows lines
/EndOfBlock false
/BlackIs1 true
>>
/CCITTFaxDecode filter useMask {imagemask} {image} ifelse
!!!! binary G4 data goes here !!!!
%%%%%%%% end of G4 data
restore
showpage
%%End of Example