%!PS-Adobe-3.0 %%Title: FreeCheck %%LanguageLevel: 2 %%EndComments %%BeginProlog /inch {72 mul} def /PrintCheckBody {true} def /LogoHeight {0.6 inch} def /MemoLineHeight {0.25} def /PayeeLineHeight {0.60} def /Routing (R123456780R) def /SignatureLineHeight {0.25} def /CheckHeight {2.83 inch} def /OnUs (S4232268154PSCCCC) def /TransitSymbol (A) def /LeftMargin {0.20 inch} def /NumPages {1} def /MICRFontSize {12} def /MICRHorTweak {0} def /Fraction (37-5678/1234) def /OnUsSymbol (C) def /DashSymbol (D) def /CheckNumFontName /Helvetica-Bold def /BankCityStateZip (Anytown, USA 12345) def /StandardFontSize {9} def /DateLineHeight {0.75} def /Name1 (JOHN SMITH) def /Name2 (MARY SMITH) def /CheckVerOffset {2.50 inch} def /CheckNumDigits {4} def /CheckLayout /Original def /LineWidth {0.3} def /AmountSymbol (B) def /LogoBorder {0.0312 inch} def /TopMargin {0.20 inch} def /CityStateZip (Anytown, USA 12345) def /PrintVOID {false} def /LogoPadding {0.0625 inch} def /BankInfoHeight {0.45} def /MICRFontName /GnuMICR def /CheckHorOffset {2.50 inch} def /BankAddr1 (6780 Main Street) def /AmountLineHeight {0.50} def /BankAddr2 (Suite 45) def /PhoneNumber (512-555-1212) def /PrintMICRLine {true} def /StandardFontName /AvantGarde-Book def /Address1 (1234 Main Street) def /Address2 () def /BankName (MegaCorp Bank, NA) def /AuxOnUs () def /CheckWidth {6.00 inch} def /CheckNumber {196} def /ChecksPerPage {3} def /MICRVerTweak {0} def /RightMargin {0.25 inch} def /CheckNumFontSize {14} def /LogoWidth {0.7 inch} def % This is the main body of the postscript file, that acts on all of the % definitions we got from the config file. % Available Check Layouts /CheckLayoutDict << /Original { DrawOriginalCheckBody } /QStandard { DrawQStandardCheckBody } /QWallet { DrawQWalletCheckBody } >> def % Other Constants: % Size of the rectangular box for the amount (digits) /AmountBoxWidth {1 inch} def /AmountBoxHeight {0.25 inch} def % Max number of digits in check number, and allocate string /CheckNumDigits 4 def /CheckNumberString CheckNumber log floor 1 add cvi string def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Helpful Printing Routines % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Shows a line, then does a "carriage return / line feed" % But only if the string exists (more than 0 chars) % (How do we get the current font size (height)?) /ShowAndCR { % if dup length 0 gt % First copy { dup show % Second copy stringwidth pop neg 0 rmoveto % Original copy & move back neg 0 exch rmoveto % line down } % else { pop % discard (string) pop % discard height } ifelse } def %%BeginProcSet: substitute %%Creator: James Klicman %%CreationDate: October 2002 %%Version: 0.3 % % (string) (O) (N) substitute - % % example: (A?C) (?) (B) substitute -> (ABC) % /substitute { 0 get exch 0 get exch % convert (O) and (N) to char codes 0 % counter 3 index % (string) {} forall { % ^ (string) O N counter C 3 index % (O)[0] eq % (string)[i] == (O)[0] { % ^ (string) O N counter 3 index % (string) % ^ (string) O N counter (string) 1 index % counter % ^ (string) O N counter (string) counter 3 index % N % ^ (string) O N counter (string) counter N put % (string) counter N put } if 1 add % increment counter } forall pop % counter pop % N pop % O pop % (string) } def %%EndProcSet % Fix up the MICR line components (replace placeholders with MICR % characters) % Argh... surely there's a better way - anyone? use "forall?" /FixMICR { /CheckNumStart -1 def /CheckNumEnd -1 def /CheckNumInOnUs false def /CheckNumInAuxOnUs false def % Get starting and ending positions for check number in % (Aux)OnUs field % (This will break if check number is entered in both fields) OnUs length 1 sub -1 0 { dup % dups the index OnUs exch get (C) 0 get eq { /CheckNumInOnUs true def % If end number not yet defined, define it CheckNumEnd 0 lt { /CheckNumEnd exch def } { /CheckNumStart exch def } ifelse } { pop } ifelse } for AuxOnUs length 1 sub -1 0 { dup % dups the index AuxOnUs exch get (C) 0 get eq { /CheckNumInAuxOnUs true def % If end number not yet defined, define it CheckNumEnd 0 lt { /CheckNumEnd exch def } { /CheckNumStart exch def } ifelse } { pop } ifelse } for % Replace "R" in routing number with actual transit number symbol % That's it - should be no spaces, dashes, or anything but digits Routing (R) TransitSymbol substitute % Replace "S" with space character in AuxOnUs AuxOnUs (S) ( ) substitute % Replace "-" with dash character in AuxOnUs AuxOnUs (-) DashSymbol substitute % Replace "P" with OnUs character in AuxOnUs AuxOnUs (P) OnUsSymbol substitute % Replace "S" with space character in OnUs OnUs (S) ( ) substitute % Replace "-" with dash character in OnUs OnUs (-) DashSymbol substitute % Replace "P" with OnUs character in OnUs OnUs (P) OnUsSymbol substitute } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Original Feature Printing Routines % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /DrawMemoLine { LeftMargin MemoLineHeight CheckHeight mul moveto 2.5 inch 0 inch rlineto -2.5 inch 0 inch rmoveto 0 2 rmoveto (for) show } def /DrawSignatureLine { % Expects height of signature line % and right edge of check for % beginning position CheckWidth SignatureLineHeight CheckHeight mul moveto RightMargin neg 0 rmoveto -2.5 inch 0 rmoveto 2.5 inch 0 inch rlineto } def /DrawAmountLine { CheckWidth AmountLineHeight CheckHeight mul moveto RightMargin neg 0 rmoveto (DOLLARS) stringwidth pop neg 0 rmoveto (DOLLARS) show (DOLLARS) stringwidth pop neg 0 rmoveto -2 0 rmoveto LeftMargin AmountLineHeight CheckHeight mul lineto } def /DrawAccountHolderInfo { LeftMargin CheckHeight moveto 0 TopMargin neg rmoveto 0 StandardFontSize neg rmoveto % make room for Logo if specified /LogoForm where { pop % discard dict LogoWidth /LogoBorder where { pop % discard dict LogoBorder 2 div add } if /LogoPadding where { pop % discard dict LogoPadding 2 div add } if 0 rmoveto } if StandardFontSize Name1 ShowAndCR StandardFontSize Name2 ShowAndCR StandardFontName findfont StandardFontSize 1 sub scalefont setfont StandardFontSize 1 sub Address1 ShowAndCR StandardFontSize 1 sub Address2 ShowAndCR StandardFontSize 1 sub CityStateZip ShowAndCR StandardFontSize 1 sub PhoneNumber ShowAndCR StandardFontName findfont StandardFontSize 1 add scalefont setfont } def /DrawDateLine { 0.6 CheckWidth mul DateLineHeight CheckHeight mul moveto (Date) show 1 inch 0 rlineto } def /DrawBankInfo { LeftMargin BankInfoHeight CheckHeight mul moveto StandardFontSize BankName ShowAndCR StandardFontName findfont StandardFontSize 1 sub scalefont setfont StandardFontSize 1 sub BankAddr1 ShowAndCR StandardFontSize 1 sub BankAddr2 ShowAndCR StandardFontSize 1 sub BankCityStateZip ShowAndCR StandardFontName findfont StandardFontSize 1 add scalefont setfont } def /DrawPayeeLine { LeftMargin PayeeLineHeight CheckHeight mul moveto (ORDER OF) show (ORDER OF) stringwidth pop neg StandardFontSize rmoveto (PAY TO THE) show 0 StandardFontSize neg rmoveto 4 0 rmoveto currentpoint mark CheckWidth PayeeLineHeight CheckHeight mul moveto RightMargin neg 0 rmoveto AmountBoxWidth neg 0 rmoveto 0 AmountBoxHeight rlineto AmountBoxWidth 0 rlineto 0 AmountBoxHeight neg rlineto AmountBoxWidth neg 0 rlineto -4 0 rmoveto /Helvetica-Bold findfont 14 scalefont setfont ($) stringwidth pop neg 0 rmoveto ($) show ($) stringwidth pop neg 0 rmoveto -4 0 rmoveto cleartomark lineto StandardFontName findfont StandardFontSize scalefont setfont } def /DrawCheckNumber { CheckWidth CheckHeight moveto RightMargin neg TopMargin neg rmoveto CheckNumFontName findfont CheckNumFontSize scalefont setfont CheckNumberString stringwidth pop neg 0 rmoveto 0 -14 rmoveto CheckNumberString show StandardFontName findfont StandardFontSize scalefont setfont } def /DrawFraction { 0.6 CheckWidth mul CheckHeight moveto 0 TopMargin neg rmoveto 0 StandardFontSize neg rmoveto Fraction show } def /DrawStub { CheckHorOffset 2 inch ge { save newpath CheckHorOffset neg 0 translate StandardFontName findfont StandardFontSize 1 sub scalefont setfont /StubSpacing {CheckHeight 6 div} def CheckHorOffset 2 div StubSpacing 5 mul moveto CheckNumberString show 0.3 inch StubSpacing 4 mul moveto (Date ) show CheckHorOffset 0.3 inch sub StubSpacing 4 mul lineto 0.3 inch StubSpacing 3 mul moveto (Payee ) show CheckHorOffset 0.3 inch sub StubSpacing 3 mul lineto 0.3 inch StubSpacing 2 mul moveto (Amount ) show CheckHorOffset 0.3 inch sub StubSpacing 2 mul lineto 0.3 inch StubSpacing 1 mul moveto (Memo ) show CheckHorOffset 0.3 inch sub StubSpacing 1 mul lineto stroke restore } if } def /DrawOriginalCheckBody { DrawBankInfo DrawAccountHolderInfo DrawMemoLine DrawSignatureLine DrawAmountLine DrawPayeeLine DrawCheckNumber DrawFraction DrawDateLine /DrawLogo where { pop DrawLogo } if DrawStub } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % QStandard & QWallet Feature Printing Routines % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%BeginProcSet: nextline %%Creator: James Klicman %%CreationDate: October 2002 %%Version: 0.3 % % state used by initline and nextline % /LINESTATE << /x 0 /y 0 /rx 0 /ry 0 >> def % % LineHeight initline - % /initline { LINESTATE begin currentpoint /y exch def /x exch def /ty exch def /tx exch def end } def % % - nextline - % /nextline { LINESTATE begin x tx add dup /x exch def % x += tx y ty add dup /y exch def % y += ty moveto % x y moveto end } def %%EndProcSet %%BeginProcSet: alignment %%Creator: James Klicman %%CreationDate: October 2002 %%Version: 0.3 % % (string) centeralign (string) % /centeralign { dup % dup (string) stringwidth % calculate string xWidth, yHeight pop % discard yHeight 2 div neg % -(xWidth / 2) 0 rmoveto % rmoveto center } def % % (string) rightalign (string) % /rightalign { dup stringwidth % calculate string xWidth, yHeight pop % discard yHeight neg 0 rmoveto % -xWidth 0 rmoveto } def % % (string) stringbbox x1 y1 x2 y2 % % This procedure is based on the method described in Chapter 5 page 333 % of the PostScript Language Reference third edition. % /stringbbox { gsave newpath 0 0 moveto false charpath flattenpath pathbbox % x1 y1 x2 y2 grestore } def % % (string) topalign (string) % /topalign { dup stringbbox % ^+ x1 y1 x2 y2 neg 0 exch rmoveto % 0 -y2 rmoveto pop % x2 pop % y1 pop % x1 } def % % (string) bottomalign (string) % /bottomalign { dup stringbbox % ^+ x1 y1 x2 y2 pop % y2 pop % x2 neg 0 exch rmoveto % 0 -y1 rmoveto pop % x1 } def %%EndProcSet %%BeginProcSet: qchecks %%Creator: James Klicman %%CreationDate: October 2002 %%Version: 0.3 /QStandardConfig << /RightMarginX CheckWidth RightMargin sub /UnderlineOffset -3 /MemoLineWidth 3.25 inch /SignatureLineWidth 3.25 inch /PayToTheOrderOf { currentpoint % oldpoint 0 StandardFontSize rmoveto % move up one line (PAY TO THE) show moveto % oldpoint moveto (ORDER OF ) show } % QStandard Coords, Check Size 8.5" x 3.5" /Date [ 503.08 183.44] /Amount [ 499.96 147.44 ] /Verbal [ 36.04 123.44 ] /Payee [ 84.04 147.44 ] /Memo [ 63.16 39.44 ] /Address [ 72.04 99.44 ] /Stub false >> def /QWalletConfig << /RightMarginX CheckWidth RightMargin sub /UnderlineOffset -2 /MemoLineWidth 2.5 inch /SignatureLineWidth 2.5 inch /PayToTheOrderOf { 0 StandardFontSize 2 mul rmoveto % move up two lines 0 StandardFontSize neg initline (PAY) show nextline (TO THE) show nextline (ORDER OF ) show } % QWallet Coords, Check Size 6" x 2.8333" /Date [ 346.12 147.44 ] /Amount [ 331.96 135.44 ] /Verbal [ 24.04 123.44 ] /Payee [ 46.12 135.44 ] /Address [ 25.0 99.44 ] /Memo [ 45.16 39.44 ] /Stub true /StubDate [ 31.96 147.44 ] /StubPayee [ 31.96 123.44 ] /StubAmount [ 52.12 87.44 ] /StubMemo [ 31.96 63.44 ] /StubCategory [ 31.96 39.44 ] /StubAccount [ 31.96 15.44 ] >> def % % /name (label) DrawQLabeline-rightmargin - % % draw label and underline to right margin % /DrawQLabeline-rightmargin { % show label % ^ /name (label) exch QCONFIG exch get aload pop % ^ (label) X Y 2 copy % ^ (label) X Y X Y moveto % X Y moveto 3 -1 roll % (label) X Y -> X Y (label) rightalign show % (label) rightalign show % ^ X Y Underline { % if % underline % line goes from end of label to right margin % ^ X Y exch ( ) stringwidth pop sub exch % backup X one space QCONFIG /UnderlineOffset get add % adjust underline position newpath dup % UnderlineY dup 3 1 roll % X, Y, Y -> Y, X, Y moveto % X Y moveto % UnderlineY is on the stack QCONFIG /RightMarginX get exch lineto % RightMarginX UnderlineY lineto stroke } % else { pop pop } ifelse } def /DrawQDate { /Date (Date ) DrawQLabeline-rightmargin } def /DrawQAmount { /Amount ($ ) DrawQLabeline-rightmargin } def /DrawQPayee { % label: PAY TO THE ORDER OF LeftMargin QCONFIG /Payee get 1 get % PayeeY moveto % LeftMargin PayeeY moveto QCONFIG /PayToTheOrderOf get exec Underline { % if % underline: Payee % line goes from end of "ORDER OF" to beginning of "$ amount" currentpoint QCONFIG /UnderlineOffset get add % CurrentY + UnderlineOffset newpath dup % UnderlineY dup 3 1 roll % X, Y, Y -> Y, X, Y moveto % X Y moveto % ^ UnderlineY QCONFIG /Amount get 0 get % AmountX ( $ ) stringwidth pop % AdjustX sub % PayeeLineEndX = AmountX - AdjustX exch lineto % PayeeLineEndX UnderlineY lineto stroke } if } def /DrawQVerbal { % label: Dollars QCONFIG /RightMarginX get ( DOLLARS) stringwidth pop % discard yHeight sub % RightMarginX - StringWidthX % ^ LabelX QCONFIG /Verbal get 1 get % VerbalY 2 copy % LabelX VerbalY 2 copy moveto % LabelX VerbalY moveto ( DOLLARS) show % ^ LabelX VerbalY Underline { % if newpath QCONFIG /UnderlineOffset get add % VerbalY + UnderlineOffset dup % dup UnderlineY 3 1 roll % X Y Y -> Y X Y moveto % LabelX UnderlineY moveto LeftMargin exch lineto % LeftMargin UnderlineY lineto stroke } % else { pop pop } ifelse } def /DrawQMemo { % label: Memo LeftMargin QCONFIG /Memo get 1 get % MemoY moveto % LeftMargin MemoY moveto (Memo ) show Underline { % if % underline: Memo 0 QCONFIG /UnderlineOffset get rmoveto % 0 UnderlineOffset rmoveto currentpoint newpath moveto % currentpoint moveto QCONFIG /MemoLineWidth get 0 rlineto stroke } if } def /DrawQSignature { QCONFIG /RightMarginX get % if userdict /SignatureLineHeight known { SignatureLineHeight } % else { QCONFIG /Memo get 1 get % MemoY QCONFIG /UnderlineOffset get % UnderlineOffset add % MemoY UnderlineOffset add } ifelse % ^ RightMarginX SignatureY newpath moveto % RightMarginX UnderlineY moveto QCONFIG /SignatureLineWidth get neg 0 rlineto stroke } def % % [(string) ...] boldlines DrawQInfo - % % Draw array of strings as separate lines of text centered and topaligned % to the currentpoint. Null strings are skipped. If the string is non-null % and it's index is less than boldlines, the bold font is used. % /DrawQInfo { 0 % counter false % istopaligned % ^ [(string)] boldlines counter istopaligned 4 -1 roll % ^ boldlines counter istopaligned [(string)] { % ^ boldlines counter istopaligned (string) dup length 0 gt { % if % bold font if one of boldlines 2 index % counter 4 index % boldlines lt { currentfont % save font to stack BoldFontName findfont StandardFontSize scalefont setfont 5 1 roll % ^ font boldlines counter istopaligned (string) } if exch % ^ (string) istopaligned % if istopaligned { nextline true % istopaligned } % else { topalign 0 StandardFontSize neg initline true % istopaligned } ifelse exch % ^ istopaligned (string) centeralign show % (string) centeralign show % ^ boldlines counter istopaligned % restore font if one of boldlines 1 index % counter 3 index % boldlines lt { % ^ font boldlines counter istopaligned 4 -1 roll % ^ boldlines counter istopaligned font setfont % restore font from stack } if } % else { pop } % discard (string) ifelse exch 1 add exch % increment counter } forall pop % discard istopaligned pop % discard counter pop % discard boldlines } def /DrawQBankInfo { QCONFIG /Date get 0 get 4 div 3 mul % DraweeX CheckHeight TopMargin sub % DraweeY moveto % DraweeX DraweeY moveto [ BankName BankAddr1 BankAddr2 BankCityStateZip ] 1 DrawQInfo } def /DrawQAccountHolderInfo { QCONFIG /Date get 0 get 3 div % DraweeX CheckHeight TopMargin sub % DrawerY moveto % DrawerX DrawerY moveto [ Name1 Name2 Address1 Address2 CityStateZip PhoneNumber ] 2 DrawQInfo } def /DrawQCheckNumberAndFraction { currentfont % save font to stack CheckNumFontName findfont CheckNumFontSize scalefont setfont CheckWidth RightMargin sub % NumberX CheckHeight TopMargin sub % NumberY moveto % NumberX NumberY moveto CheckNumberString topalign 0 StandardFontSize 1.25 mul neg initline rightalign show nextline FractionFontName findfont FractionFontSize scalefont setfont Fraction topalign rightalign show setfont % restore font from stack } def % % LeftX RightX Y (label) DrawQStubLabeline - % /DrawQStubLabeline { 4 -1 roll % ^ RightX Y (label) LeftX 2 index % Y index moveto % LeftX Y moveto % ^ RightX Y (label) show % (label) show % ^ RightX Y QCONFIG /UnderlineOffset get % ^ RightX Y UnderlineOffset dup 0 exch rmoveto % Offset start of line add % Y UnderlineOffset add lineto % RightX Y lineto } def /DrawQStub { CheckHorOffset 2 inch ge QCONFIG /Stub get and { % if gsave CheckHorOffset neg 0 translate newpath StandardFontName findfont StandardFontSize 1 sub scalefont setfont 0.1875 inch % ^ LeftX dup CheckHorOffset exch sub % ^ LeftX RightX 2 copy % LeftX RightX QCONFIG /StubDate get 1 get % DateY (DATE ) DrawQStubLabeline 2 copy % LeftX RightX QCONFIG /StubPayee get 1 get % PayeeY (PAYEE ) DrawQStubLabeline 2 copy % LeftX RightX QCONFIG /StubAmount get 1 get % AmountY (AMOUNT ) DrawQStubLabeline 2 copy % LeftX RightX QCONFIG /StubMemo get 1 get % MemoY (MEMO ) DrawQStubLabeline 2 copy % LeftX RightX QCONFIG /StubCategory get 1 get % CategoryY (CATG. ) DrawQStubLabeline 2 copy % LeftX RightX QCONFIG /StubAccount get 1 get % AccountY (ACCT. ) DrawQStubLabeline Underline { stroke } if CheckNumFontName findfont CheckNumFontSize scalefont setfont % ^ LeftX RightX CheckHeight TopMargin sub moveto % RightX TextTop moveto CheckNumberString topalign rightalign show pop % LeftX grestore } if } def /DrawQCheckBody { DrawQDate DrawQAmount DrawQPayee DrawQVerbal DrawQMemo DrawQSignature DrawQBankInfo DrawQAccountHolderInfo DrawQCheckNumberAndFraction DrawQStub /DrawLogo where { pop DrawLogo } if } def /DrawQStandardCheckBody { /QCONFIG QStandardConfig def DrawQCheckBody } def /DrawQWalletCheckBody { /QCONFIG QWalletConfig def DrawQCheckBody } def %%EndProcSet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Standard Feature Printing Routines % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /DrawMICR { % 0.25 high, 5.6875 from right edge should be in the middle % of the tolerance band CheckWidth 0.25 inch moveto -5.6875 inch 0 inch rmoveto MICRHorTweak MICRVerTweak rmoveto % Now we're at the nominal start of the routing number MICRFontName findfont MICRFontSize scalefont setfont % Number of digits in the CheckNumberString /CheckNumDigit CheckNumberString length 1 sub def CheckNumInAuxOnUs { CheckNumEnd -1 CheckNumStart { CheckNumDigit 0 ge { AuxOnUs exch CheckNumberString CheckNumDigit get put /CheckNumDigit CheckNumDigit 1 sub def } { AuxOnUs exch (0) 0 get put } ifelse } for } if AuxOnUs stringwidth pop neg 0 rmoveto AuxOnUs show Routing show CheckNumInOnUs { CheckNumEnd -1 CheckNumStart { CheckNumDigit 0 ge { OnUs exch CheckNumberString CheckNumDigit get put /CheckNumDigit CheckNumDigit 1 sub def } { OnUs exch (0) 0 get put } ifelse } for } if OnUs show StandardFontName findfont StandardFontSize scalefont setfont } def /DrawVOID { save StandardFontName findfont 50 scalefont setfont newpath CheckWidth 2 div 1 inch moveto 30 rotate (V O I D) stringwidth pop 0 moveto (V O I D) true charpath stroke restore } def /DrawCheck { % Convert CheckNumber integer to a string CheckNumber CheckNumberString cvs pop % discard reference to CheckNumberString PrintCheckBody { CheckLayoutDict CheckLayout get exec } if PrintMICRLine { DrawMICR } if PrintVOID { % Draw border around check, and print "VOID" for testing 0 0 moveto CheckWidth 0 lineto CheckWidth CheckHeight lineto 0 CheckHeight lineto 0 0 lineto DrawVOID } if } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Main Printing Procedure % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /CurrentPage 1 def % Replace symbol placeholders with actual glyphs % Also get starting and ending position for check number FixMICR NumPages { % repeat /CheckNumber CheckNumber ChecksPerPage add def CheckHorOffset CheckVerOffset translate StandardFontName findfont StandardFontSize scalefont setfont LineWidth setlinewidth % Loop through printing checks, starting with the bottom one ChecksPerPage { % repeat /CheckNumber CheckNumber 1 sub def newpath DrawCheck stroke 0 CheckHeight translate } repeat showpage /CheckNumber CheckNumber ChecksPerPage add def /CurrentPage CurrentPage 1 add def } repeat %%EOF