This weekend I ran across an outline for a Student Transcript. It
demonstrates the type of formatted output that I'd like to be able to
generate.
HTML:
http://www.radile.com/rdweb/etl/transcript.html
PDF:
http://www.radile.com/rdweb/etl/transcript.pdf
I used "docuprint" to convert the HTML file to the PDF file, but I'd
like to follow-up with Aaron Bartell about his plans for an IBM i based
HTML to PDF converter.
The docuprint PDF conversion didn't interpret background and foreground
colors in the transcript.css file, but other than that, I was quite
pleased with the PDF output.
One advantage to the PDF format is that printer output looks exactly
like reader output without requiring any user intervention.
HTML printer output works correctly if you set page margins to 0, and
remove all headers and footers that may be defined in the print dialog.
Nevertheless this prototype shows the possibility of using HTML and
style sheets for precise formatted graphical output, with optional
conversion to PDF.
Last week I worked on a service program for generating HTML stream files
and implemented the following procedures:
rptOpen() - create a stream file and load an report template into memory
according to a report definition (analogous to opening a PRINTER file).
rptRecSet() - position to a particular record in the event that an HTML
template is divided into multiple records (analogous to records in a DDS
defined printer file).
rptVarSet() - replaces output markers in the HTML template with program
data.
rptRecWrt() - write an HTML fragment to the stream file.
rptNextPage() - cause a page eject.
rptClose() - close the stream file, free memory, and add a record to the
report library indicating the location of the stream file and related
meta data.
I chose to essentially follow the metaphor that IBM designed for
generating spool files from RPG programs, except the output is HTML in
this case.
At some point I envision adding logic to the rptClose() procedure to
pass the name of HTML stream file to a PDF converter, according to a
flag in the report definition record.
Anyway, this partially indicates the direction I'm headed for reports.
As an Amazon Associate we earn from qualifying purchases.