Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-02-28T13:27:31Z by Kenneth_IL
Kenneth_IL
Kenneth_IL
6 Posts
ACCEPTED ANSWER

Pinned topic PDFBox under CICS.

‏2013-02-26T21:17:21Z |
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
  • Kenneth_IL
    Kenneth_IL
    6 Posts
    ACCEPTED ANSWER

    Re: PDFBox under CICS.

    ‏2013-02-28T13:26:57Z  in response to Kenneth_IL
    Problem 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.
  • Kenneth_IL
    Kenneth_IL
    6 Posts
    ACCEPTED ANSWER

    Re: PDFBox under CICS.

    ‏2013-02-28T13:27:31Z  in response to Kenneth_IL
    Problem 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.