Xerox 721P87491 Printer User Manual


 
POSTSCRIPT
XEROX DOCUPRINT NPS GUIDE TO USING PAGE DESCRIPTION LANGUAGES 2-33
Figure 2-12. PostScript with embedded image: normal scan
order
The following example illustrates the requirements for embedding
and printing an image in an enhanced scan. If a large number of
images are to be printed, it is best to avoid the internal rotation. To
do this, you must include the data in the order in which it is required,
which means that the fast scan direction for the image is bottom-to-
top, and the slow scan direction is left-to-right.
Assuming that the data was reordered in this way, the following
example shows a fragment of PostScript that produces the same
output as the previous fragment.
%!PS - Adobe - 3.0
% G4.example.ps
% Example using embedded CCITT group 4 (G4) data.
% Example using data in "normal" scan order, which has the fast scan
% direction left-to-right, and the slow scan direction top-to-bottom.
% Page size is roughly 8.5x11 (slightly clipped).
% Data has resolution of 300 spots per inch.
% Fast scan direction for the image is left-to-right across the page.
% Slow scan direction for the image is top-to-bottom down the page.
% This scan direction requires 90 degree internal rotation for
DocuPrint.
% printers, although the PostScript code has no explicit rotation given.
/lines 3296 def % lines in the image
/bpl 2528 def % bits per line
/res 300.0 def % spots per inch of image resolution
/useMask true def % true => use imagemask, false => use image
save
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