* these are the utility functions * xo and yo are global X Y offsets that allow the form to be globally moved around on the paper. This was especially necessary * because the forms were two sided, the process would print the front side and wait for the user to put the page back into * the manual sheet feed bypass on the printer tray. * units are in inches, except for linewidths which are in native point size 1/300 inch function Scale parameter x return ltrim( str( x * 300, 6 ) ) * DOC * Routine:XY_Print * Parameters: * Author:dgf * Description:Return a (x,y) located string for the HP LJIII * Revision:19-Sep-91 Initial Release * 19-Sep-91 changed to function to try to solve the Memory Error problem function XY_Print parameter x, y, str return chr(27) + "*p" + Scale( xo + x ) + "x" + Scale( yo + y ) + "Y" + str function XY_U_Print parameter x, y, str, length return chr(27) + "*p" + Scale( xo + x ) + "x" + Scale( yo + y ) + "Y" + str + Underline( length ) function Underline parameter length return chr(27) + "*c" + Scale( length ) + "a1b0P" function HLine parameter x, y, length, width return chr(27) + "*p" + Scale( xo + x ) + "x" + Scale( yo + y ) + "Y" + ; chr(27) + "*c" + Scale( length ) + "a" + ltrim( str( width ) ) + "b0P" function VLine parameter x, y, length, width return chr(27) + "*p" + Scale( xo + x ) + "x" + Scale( yo + y ) + "Y" + ; chr(27) + "*c" + ltrim( str( width ) ) + "a" + Scale( length ) + "b0P" function Shade parameter x, y, length, width, percent return chr(27) + "*p" + Scale( xo + x ) + "x" + Scale( yo + y ) + "Y" + ; chr(27) + "*c" + Scale( length ) + "a" + Scale( width ) + "b" + ltrim( str( percent ) ) + "g2P" procedure Box parameter x, y, length, width, thickness ??? HLine( x, y, width, thickness ) ??? HLine( x, y + length, width, thickness ) ??? VLine( x, y, length, thickness ) ??? VLine( x + width, y, length, thickness ) returnAnd here is part of a sample form:
xo = 0.15 yo = -0.15 ComFront( .f. ) * DOC * Routine:ComFront * Parameters:boolean hourly * Author:dgf * Description:Draw the common parts for the front of the Med/Den forms * Revision:19-Feb-92 Initial Release procedure ComFront parameter hourly ??? chr(27) + "(s1p13v4s0b4148T" && univers 13 pt ??? XY_Print( 2.9, 0.65, "XYZ COMPANY" ) ??? chr(27) + "(s1p11v0s3b4148T" && univers 11 pt bold ??? XY_Print( 0.1, 1.2, "INSTRUCTIONS" ) ??? XY_Print( 0.1, 2.32, "SECTION 1" ) ??? XY_Print( 2.6, 2.32, "TO BE COMPLETED BY EMPLOYEE" ) ??? XY_Print( 2.9, 3.90, "EMPLOYEE SIGNATURE" ) ??? XY_Print( 0.1, 4.95, "SECTION 2" ) ??? XY_Print( 1.6, 4.95, "TO BE COMPLETED BY XYZ INSURANCE COORDINATOR" ) ??? VLine( 0.0, 1.0, 8.9, 7 ) ??? VLine( 7.6, 1.0, 8.9, 7 ) ??? HLine( 0.0, 1.0, 7.6, 7 ) ??? HLine( 0.0, 1.3, 7.6, 7 ) ??? HLine( 0.0, 2.12, 7.6, 7 ) ??? HLine( 0.0, 2.41, 7.6, 7 ) ??? HLine( 0.0, 3.7, 7.6, 7 ) ??? HLine( 0.0, 4.0, 7.6, 7 ) ??? HLine( 0.0, 4.75, 7.6, 7 ) ??? HLine( 0.0, 5.05, 7.6, 7 ) ??? HLine( 0.0, 9.9, 7.62, 7 ) ??? VLine( 2.9, 2.41, 0.27, 4 ) ??? VLine( 4.35, 2.41, 0.27, 4 ) ??? VLine( 4.75, 2.41, 0.27, 4 ) ??? VLine( 6.0, 2.41, 0.27, 4 ) ??? HLine( 0.0, 2.68, 7.6, 4 ) ??? HLine( 0.0, 3.0, 7.6, 4 ) ??? HLine( 0.0, 7.00, 7.6, 4 ) ??? VLine( 1.55, 3.0, 0.4, 4 ) ??? VLine( 5.2, 3.0, 0.4, 4 ) ??? VLine( 6.95, 3.0, 0.4, 4 ) ??? HLine( 0.0, 3.4, 7.6, 4 ) ??? HLine( 0.0, 9.6, 7.6, 4 ) ??? VLine( 4.05, 7.00, 2.6, 4 ) ??? HLine( 0.0, 7.25, 4.05, 4 ) ??? HLine( 0.0, 7.50, 4.05, 4 ) ??? HLine( 0.0, 7.75, 4.05, 4 ) ??? Vline( 2.05, 7.75, 0.25, 4 ) ??? Vline( 2.95, 7.75, 0.25, 4 ) ??? HLine( 0.0, 8.0, 4.05, 4 ) ??? Hline( 4.05, 8.25, 3.55, 4 ) ??? Shade( 0.0, 1.0, 7.6, 0.3, 20 ) ??? Shade( 0.0, 2.12, 7.6, 0.3, 20 ) ??? Shade( 0.0, 4.75, 7.6, 0.3, 20 ) ??? chr(27) + "(s1p6.5v0s0b4148T" && univers 6.5 pt ??? XY_Print( 0.1, 1.45, "1. You must complete all questions in Section 1. Unanswered questions will delay benefit consideration until the missing information is obtained." ) ??? XY_Print( 0.1, 2.04, "4. Send this form and all related bills to your XYZ Company insurance coordinator at the address listed below." ) ??? chr(27)+"(7J" && Desktop Symbol Set ??? chr(27) + "(s1p7v0s0b4148T" && univers 7 pt ??? XY_Print( 0.1, 2.53, "NAME OF EMPLOYEE" ) ??? XY_Print( 2.95, 2.53, "SINGLE" ) ??? XY_Print( 3.67, 2.53, "DIVORCED" ) ??? XY_Print( 2.95, 2.65, "MARRIED" ) ??? XY_Print( 3.67, 2.65, "WIDOW" ) ??? XY_Print( 4.48, 2.53, "F" ) ??? XY_Print( 4.48, 2.65, "M" ) ??? XY_Print( 4.8, 2.53, "BIRTHDATE" ) ??? XY_Print( 6.05, 2.53, "SOCIAL SECURITY NUMBER" ) ??? XY_Print( 0.1, 2.8, "ADDRESS OF EMPLOYEE: NO. AND STREET" ) ??? XY_Print( 3.6, 2.8, "CITY" ) ??? XY_Print( 5.6, 2.8, "STATE" ) ??? XY_Print( 7.1, 2.8, "ZIP" ) ??? XY_Print( 0.1, 3.12, "IS CONDITION DUE" ) ??? XY_Print( 0.1, 3.24, "TO ACCIDENTAL" ) ??? XY_Print( 0.1, 3.36, "INJURY?" ) ??? XY_Print( 1.20, 3.18, "YES" ) ??? XY_Print( 1.20, 3.3, "NO" ) ??? XY_Print( 1.6, 3.12, "HOW DID ACCIDENT HAPPEN?" ) ??? XY_Print( 5.25, 3.18, "PLACE OF" ) ??? XY_Print( 5.25, 3.3, "ACCIDENT:" ) ??? XY_Print( 5.9, 3.18, "AUTO" ) ??? XY_Print( 5.9, 3.3, "WORK" ) ??? XY_Print( 6.4, 3.18, "HOME" ) ??? XY_Print( 6.4, 3.3, "OTHER" ) ??? XY_Print( 7.05, 3.12, "DATE OF" ) ??? XY_Print( 7.0, 3.22, "ACCIDENT:" ) ??? XY_Print( 0.1, 4.29, "association to release information to QWERTY, Inc. as is required to properly pay all benefits, if any due me." ) ??? XY_U_Print( 0.1, 4.62, "DATE ", 0.85 ) ??? XY_U_Print( 1.3, 4.62, "EMPLOYEE SIGNATURE ", 5.0 ) ??? XY_Print( 0.1, 7.10, "Name of Employee" ) ??? XY_Print( 4.1, 7.10, "This claim was received at XYZ Company:" ) ??? XY_Print( 0.1, 7.35, "Social Security No." ) ??? XY_Print( 0.1, 7.6, "Effective date of coverage" ) ??? XY_Print( 0.1, 7.85, "Plant No." ) ??? XY_Print( 2.1, 7.85, "Location:" ) ??? XY_Print( 3.0, 7.85, "Group:" ) ??? XY_Print( 4.1, 8.35, "Send this form to:" ) ??? XY_U_Print( 0.1, 9.83, "DATE ", 1.3 ) ??? XY_U_Print( 1.8, 9.83, "INSURANCE COORDINATOR'S SIGNATURE ", 3.65 ) ??? XY_Print( 0.0, 10.05, "ADMINISTERED BY QWERTY, INC." ) ??? XY_Print( 0.0, 10.17, "Any person who knowingly and with intent to injure, defraud, or deceive the plan, files a statement of claim containing any false, incomplete or misleading" ) ??? XY_Print( 0.0, 10.29, "information is guilty of an illegal act." ) ??? chr(27) + "(s1p12v0s0b4148T" && univers 12 pt ??? XY_Print( 3.5, 2.55, "»" ) && single ??? XY_Print( 4.22, 2.55, "»" ) && divorced ??? XY_Print( 3.5, 2.67, "»" ) && married ??? XY_Print( 4.22, 2.67, "»" ) && widow ??? XY_Print( 4.6, 2.55, "»" ) && F ??? XY_Print( 4.6, 2.67, "»" ) && M ??? XY_Print( 1.4, 3.20, "»" ) && YES accidental ??? XY_Print( 1.4, 3.32, "»" ) && NO ??? XY_Print( 6.23, 3.20, "»" ) && auto ??? XY_Print( 6.23, 3.32, "»" ) && work ??? XY_Print( 6.75, 3.20, "»" ) && home ??? XY_Print( 6.75, 3.32, "»" ) && other return>With all graphics / fonts + printer control ?