Support for custom paper sources
On Windows® systems the reporting API function
fgl_report_setSVGPaperSource()
can be used to identify a custom paper source
for your report.
fgl_report_setSVGPaperSource()
must be used in conjunction with these
functions: fgl_report_setSVGPrinterName(printerName)
to specify the printerfgl_report_configureSVGPreview("PrintOnNamedPrinter")
to bypass the preview and print silently on the named printer
The printerinfo command
On Windows systems, the command-line executable $GDCDIR/bin/printerinfo.exe is provided to list the supported paper sources that can be changed programmatically using this function.
This printerinfo command is part of the Genero Desktop Client, so it is in the GDC directory. This is a separate file to the server-side printerinfo executable in the GRE directory.
The output of the command lists the device-specific source names in the left column, with the
general constant in brackets on the right. Either can be used to identify the paper
source in calls to fgl_report_setSVGPaperSource()
.
This excerpt lists seven paper sources for the printer "Balzac":
Example:
CALL fgl_report_setSVGPrinterName("Balzac")
CALL fgl_report_setSVGPaperSource("Tray 2")
CALL fgl_report_configureSVGPreview("PrintOnNamedPrinter")
This excerpt of the printerinfo
output is for a printer that has 27 paper
sources. Since there are only 15 predefined constants for the paper sources, most of the paper
sources are identified by integer constants, which can be used in calls to fgl_report_setSVGPaperSource()
Using the integer constant can prevent
encoding issues when the device-specific name contains non-ASCII characters, such as "Sèlection
automatique".