JIS2004 support for PDT printing and Print-to-File for 3270E sessions
To print JIS2004 characters:
- For PDT printing, specify a pdfpdt file, such as ibm5577.pdfpdt, and ensure that the parameter KANJI_CODE=SHIFT_JIS is specified.
- For Print-to-File, specify the file encoding using
the parameter KANJI_CODE:
- To save the output as a PC file, dumping the output as a PC file with a font image, set the file encoding to Shift JIS by specifying KANJI_CODE=SHIFT_JIS in the pdfpdt file. The print output is saved as a native PC file that can be used to output the file content to a physical printer.
- To save the output as an Unicode file, dumping the output as a Unicode file with code points of surrogate pairs, set the file encoding to Unicode by specifying KANJI_CODE=UNICODE in the pdfpdt file. The print output is a UCS-2 file that can be used for further data processing or archiving purposes.
The following table shows the results of specifying different values
for the KANJI_CODE session parameter with different pdfpdt files when
printing data with JIS2004 characters to an output file (Print-to-File):
Session parameter in pdfpdt file | ASCII text mode (basic_dbcs.pdf) | Other supported printers (esc_*.pdf, ibm*.pdf, lips*.pdf, etc.) |
---|---|---|
KANJI_CODE=SHIFT_JIS | Not applicable since surrogate pairs can not be stored in a native PC file. | The output is saved to a native PC file and font images (binary data) for JIS2004 characters and UDA characters are stored in this file. |
KANJI_CODE=UNICODE | The output is saved to a Unicode file; surrogate pairs and UDA characters are stored in UCS-2. | Not applicable since a PC printer does not accept Unicode data. |
In addition, you should also configure the session parameters printerMimeType
and printSaveAsExtension properly when printing to a file:
Setting | Session parameter in pdfpdt file | Session parameter printerMimeType in ZIETrans | Session parameter printSaveAsExtension in ZIETrans | Results |
---|---|---|---|---|
Setting for further printing | KANJI_CODE=SHIFT_JIS | application/octet-stream | .bin | A native PC file with binary data. |
Setting for ASCII text mode | KANJI_CODE=UNICODE | text/plain | .txt | A UCS-2 file. |
For more information see Defining print support for your project and Printing.