Alternate PDF Generation Option for OIPI Classic (OpenInsight 10.0.8+) (Reporting and Printing)
Created at 29 JAN 2020 08:05AM
There have been reports on some systems that PDF generation in OIPI "Classic"(VSPRINTER/VSPRINTER1) often fails to generate valid, or complete, PDFoutput. This has been confirmed to be an issue, but unfortunately it has not been resolved for this release.
As a workaround, OIPI "Classic" in OpenInsight 10.0.8 now supports an alternate method for PDF generation. In the configuration record (found in the SYSENV table, and named either CFG_OIPI*<appid>*<username>,CFG_OIPI**<username>, CFG_OIPI*<appid>, or simply CFG_OIPI), field 3 can now specify the name of a "Print to PDF" printer. On Windows 10 systems, for example, there is an included "Microsoft Print to PDF" printer, though other options (both free and paid) exist with similar or advanced capabilities.
Some PDF printers can be configured to print to a specific location - for example, "C:\TEMP\MYPDF.PDF". Others, including the "Microsoft Print to PDF" printer, will interactively prompt for the output name. In the CFG_OIPI record, field 4 should be configured with the static print file output location, if one can be specified.
After pressing the "export" key in OIPI, if the CFG_OIPI record has a printer name in field 3, and no output filename in field 4, choosing the PDF button will fill in the file name as "unused" and allow you to click the OK button.
OIPI will then invoke the specified printer, which will prompt the user itself for the output file name.
If the CFG_OIPI record has a printer name in field 3, and an output filename in field 4, choosing the PDF button will work as previously -users can specify the destination file location and name they desire. When the OK button is pressed, OIPI will invoke the specified printer and wait for the output to be generated into the pre-defined location. Once the pdf has been generated by the PDF printer, and pdf production has completed, OIPI will move the file to the user-specified location.
If the INIT call to SET_PRINTER specifies direct output to PDF, then the PDF will be generated using the PDF printer, at the INIT-specified location, only if CFG_OIPI fields 3 and 4 are both specified. If only PDF printer name is specified, then original PDF generation will be attempted.