%!PS % Assume the page is 11x17 inches, and the resolution is 72/inch. % Reserve a half inch border all around, making a print % area of 10x16. /inch { 72 mul } def /midy { 10 2 div inch } def /midx { 16 2 div inch } def << /PageSize [17 inch 11 inch] >> setpagedevice /Courier findfont 12 scalefont setfont % Get a JPEG renderer (./viewjpeg.ps) run % Translate for lower and left margins. 0.5 inch 0.5 inch translate % Define a procedure to cut a page in half. % Assumes Landscape mode /halfpage { % midx, midy assumed defined!! % Remember the calling context gsave % Landscape or Portrait in the half page midx 0 translate % Starting at the new spot. 90 rotate % Define a new clipping path 0 0 moveto 0 midy lineto midx midy lineto midx 0 lineto 0 0 closepath clip % Finally, set new midx, midy /midx /midy midy 2 div midx def def } bind def % Inverse for halfpage /fullpage { /midx /midy midy 2 mul midx def def grestore } bind def % Inhibit showpage implicit in run. % save /showpage { } def % Define a halfpage and draw the board top in it. halfpage (M220Cfront.jpg) viewJPEG fullpage % Draw the back on the other half. %midx midy translate %halfpage %(M220CBack.jpg) viewJPEG %fullpage %0 midx - 0 midy - translate % Display the result showpage % Define a clipping region and draw a JPEG image in it. gsave 0 0 moveto 0 midy lineto midx midy lineto midx 0 lineto 0 0 closepath clip (M220Cfront.jpg) viewJPEG grestore gsave midx midy translate 0 0 moveto 0 midy lineto midx midy lineto midx 0 lineto 0 0 closepath clip (M220CBack.jpg) viewJPEG grestore % Show the page with the JPEG images. showpage midx midy translate 0 2.75 inch moveto (Component Side:) show (M220C-cs.eps) run 0 0 midy sub translate 0 2.75 inch moveto (Solder Side:) show (M220C-ss.eps) run % Now force a showpage % restore showpage