Printing invoices using C$PDF

Printing invoices using C$PDF


The following Cobol program creates a sample invoice using the C$PDF function available in Microfocus Extend 10.3.


Input file and logo.jpg both must exist on the desktop during runtime.
Invoice file will be a .pdf file that will be created on the desktop.
Cobol program will have access to extend copybook CPDF.DEF during compile.


Program will read the invoice.txt file and create the invoice PDF on the desktop. The invoice.txt file is a tab delimited input file containing values that will be used to populate the PDF file.

Invoice.txt Tab delimited layout

COLUMN NAME Description Value (Column 2)
INVOICE The Name of the Invoice File to be Created
DATE Date of Invoice
DUE When the Date of Invoice
COMPANY Name of Company receiving Invoice
ADDRESS Address of Company
CSZ City, State, Zipcode
I Invoice Line Item (Columns 2, 3, and 4)
Item Description Hours Rate
Labels (1)


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2020-01-21 20:09
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.