PDF on z/OS - Arabic in PDF not displayed on Windows

General discussion on the JZOS batch launcher and toolkit
Post Reply
tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

PDF on z/OS - Arabic in PDF not displayed on Windows

Post by tsdjim »

I have download the jZOS toolkit from Dovetail and executed the supplied sample successfully and produced the PDF on z/OS. I then edited the sample and changed some names to Arabic, just to see if arabic would be displayed in the PDF. The z/os codepage is 420 and I tried file.encoding=ISO-8859-6 (for windows 1256) and also ISO-8859-1. When the PDF is displayed under Windows, the Arabic is not displayed, being replaced by latin characters. Is this a problem with the Windows fonts or is there another setting I need in JZOS?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: PDF on z/OS - Arabic in PDF not displayed on Windows

Post by dovetail »

I don't understand... the JZOS toolkit is an IBM product. Where did you download it? What specific sample program are you referring to?
tsdjim
Posts: 64
Joined: Fri May 07, 2010 2:21 am

Re: PDF on z/OS - Arabic in PDF not displayed on Windows

Post by tsdjim »

I m using the iTextPdfGenerator through jZOS. I downloaded this from the DOvetail website in the Case Study section:
http://www.dovetail.com/downloads/coz/index.html
Generation of multi-page PDF documents with Co:Z, Release 0.1.0 - May 15, 2012 Executables, Java source and JCL, coz-itext-0.1.0-xmit.zip
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: PDF on z/OS - Arabic in PDF not displayed on Windows

Post by dovetail »

There could be two places where the encoding needs to be fixed:

1) Reading the input CSV data from a file or dataset into Java (Unicode) strings.
The sample iText program reads input CSV data using the sample FileFactory class.
If you are reading from a dataset (or DD), the sample code uses the default z/OS encoding, which is usually IBM-1047:

Code: Select all

	
private static BufferedReader getZFileBufferedReader(String filename) throws IOException {
		ZFile zFile = new ZFile(ZFile.getSlashSlashQuotedDSN(filename, true), "rt"); 
		return new BufferedReader(new InputStreamReader(zFile.getInputStream(), ZUtil.getDefaultPlatformEncoding()));
        }
So, the first thing would be to check the input data to see if the characters that you want are properly represented in that codepage.
If you want a different codepage, you would need to modify the sample program to allow you to read data from a dataset in a different codepage.

2) The PDF template field's encoding and font.
I'm not sure how to change this. Best to rule out (1) as the problem first.
Post Reply