call "PC_PRINTER_GET_FONT" using printer-handle font-family-name font-size font-style returning status-code
01 cblt-printer-name typedef. 03 cblte-pn-name-length cblt-x2-comp5. *> pic x(2) comp-5. 03 cblte-pn-name cblt-x1. *> Occurs depending on *> cblte-pn-name-length. pic x(n).
All remaining bits are reserved for future.
working-storage section. 01. 03 document-title. 05 title-len pic x(2) comp-5. 05 title-text pic x(20). 03 font-family. 05 font-family-namelen pic x(2) comp-5 value 80. 05 font-family-name pic x(80). 03 font-size pic x(4) comp-5. 03 font-style pic x(4) comp-5. 03 abort pic x(4) comp-5 value 1. 03 control pic x(4) comp-5 value 2. 03 flags pic x(4) comp-5 value 3. 03 handle pic x(4) comp-5. procedure division. move 17 to title-len move "Printer Info Test" to title-text call "PC_PRINTER_OPEN" using by reference handle by reference document-title by value flags by value 0 end-call if return-code = zero call "PC_PRINTER_GET_FONT" using by reference handle by reference font-family by reference font-size by reference font-style end-call if return-code equal zero if font-size equal zero display "Current Font : no font selected" else display "Current Font : " font-family-name(1:font-family-namelen) display "Font size : " font-size display "Raw Font Style : " font-style end-if else display "PC_PRINTER_GET_FONT failed" end-if end-if perform close-down-printer . close-down-printer section. call "PC_PRINTER_CONTROL" using by reference handle by value abort end-call call "PC_PRINTER_CLOSE" using by reference handle end-call .