IDENTIFICATION DIVISION. PROGRAM-ID. Test-PrintWizard. * * Sample program to demonstrate calling Print Wizard DLL ****************************************************************** ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. computer-name. OBJECT-COMPUTER. computer-name. DATA DIVISION. WORKING-STORAGE SECTION. 01 Printwiz_window signed_long. 01 Printwiz_record. 02 Printwiz_char pic x occurs 255 times. 01 Printwiz_length signed-long. 01 Printwiz_charset signed-long. 01 return_val signed_long. ****************************************************************** PROCEDURE DIVISION. Main Section. perform PW-INIT. * Note that it is not necessary to do a printer selection Perform PW-SETUP-PRINTER. perform 30 times move "This is a test record representing an 80-column disp - "lay" to printwiz_record perform PW-PRINT-LINE end-perform. perform PW_FLUSH. * Following demonstrates auto-fit logic perform 30 times move "This is a test record representing a 132-column disp - "lay that will cause Print Wizard to switch into a pr - "proper character size..." to printwiz_record perform PW-PRINT-LINE end-perform. perform PW_FLUSH. Fancy-print. * Now we'll get fancy move "
"
              to printwiz_record
              perform PW-PRINT-LINE.
           move "
" to printwiz_record perform PW-PRINT-LINE. move "Print Wizard " to printwiz_record perform PW-PRINT-LINE. move "Brings" to printwiz_record perform PW-PRINT-LINE. move " Leading Edge Printing" to printwiz_record perform PW-PRINT-LINE. move "to - "" to printwiz_record perform PW-PRINT-LINE. move " COBOL" to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move "This page was generated by a program" to printwiz_record perform PW-PRINT-LINE. move "running in AcuCobol on Windows!" to printwiz_record perform PW-PRINT-LINE. move "
The goal of Print Wizard is to allow - "programs written in any language to" to printwiz_record perform PW-PRINT-LINE. move "precisely control modern printers, in a printer-indepen - "dent manner." to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move "Start with your existing report programs. Add some simp - "le tags for job-level settings: paper size, orientatio - "n, and print quality. A few additional tags" to printwiz_record perform PW-PRINT-LINE. move "ensure that line spacing and margins are right, and tha - "t the text fits on the" to printwiz_record perform PW-PRINT-LINE. move "page. If you stop at that level, the rest of your data - "can be unchanged." to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move "The next step is to add tags to the body of your text. - "This gives you the" to printwiz_record perform PW-PRINT-LINE. move "ability to do inline font characteristic changes, such - "as bold, italic," to printwiz_record perform PW-PRINT-LINE. move "underline or all three." to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move "You can change the - " size at will. Stretch it, compress it," to printwiz_record perform PW-PRINT-LINE. move "or change the font." to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move "So fa - "r you're letting the Print Wizard position the text. If - " you want to position" to printwiz_record perform PW-PRINT-LINE. move "text precisely, you can do that, as shown above. You ca - "n also print rectangles," to printwiz_record perform PW-PRINT-LINE. move "lines and bars, in any color or shade of gray, position - "ed precisely on the page," to printwiz_record perform PW-PRINT-LINE. move "even accounting for unprintable areas at the edges of t - "he page." to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. move " " to printwiz_record perform PW-PRINT-LINE. * Note that images are looked for in the Acucobol runtime's directory move "You can even include bitmaps: