This topic has been locked.
2 replies Latest Post - 2013-02-28T13:27:31Z by Kenneth_IL
Pinned topic PDFBox under CICS.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
We are using Apache PDFBox in a application running in CICS on a Z9 platform. After some intial sucess we ecountered a problem when using the library to update and save a pdf. The PDF class PDDocument that has a save method that takes an outputstream. We save the modified PDF to a BytyeArrayOuputStream and the toByteArray method to a java array of bytes to store the pdf in Content Manager. The problem seems to be that some process is changing CR LF (0x0d, 0x0a) to just LF in the PDF and stripping CR from the xref section of the PDF. I think it might have something to do with the code page.
Updated on 2013-02-28T13:27:31Z at 2013-02-28T13:27:31Z by Kenneth_IL
Re: PDFBox under CICS.2013-02-28T13:26:57Z in response to Kenneth_ILProblem solved. The problem had to do with a section of code in PDFBox that writes numeric data to the pdf file as s string. The string are written using EBCDIC encoding under CICS. I modified the code to translate this to UTF-8.
Re: PDFBox under CICS.2013-02-28T13:27:31Z in response to Kenneth_ILProblem solved. The problem had to do with a section of code in PDFBox that writes numeric data to the pdf file as a string. The strings are were being written using EBCDIC encoding. I modified the code to translate the string to UTF-8 encoding.