Intro
The following Cobol program creates a sample invoice using the C$PDF function available in Microfocus Extend 10.3.Assumptions
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.
Summary
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)
|
#HowTo-BestPractice