Skip to Content
author's profile photo Former Member
Former Member

Print OTF Stream

Hi everybody!

Is there a possibility to convert a OTF Stream received from the R/3 backend on the portal server in Java ?

We tried the CONVERT_OTF_2_PDF Function and filled up a table with the strings of the pdf. Unfortunately when I accessed the JCO.Table in the portal, some whitespaces were missing and therefore the pdf was corrupted. I tried to access the JCO.record directly with the

getByteArray method but no luck... Any clues?

Btw. we try to preserve the OTF print layout to pass it directely to a printer via the portal...

Cheers, Jens

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 12, 2004 at 06:34 PM

    Hi Jens,

    we have got the same problem. When we received a PDF-file there were some blanks missing. The only workaround we got is the following. Normally the length of a line in JCO.Table is 255 characters. If the line is shorter we fill in blanks until we get the 255 characters per line. It works fine!!!

    JCO.ParameterList tableParamProof =funcProof.getTableParameterList();

    JCO.Table sapTable = tableParamProof.getTable("LIST");

    int size = funcProof.getExportParameterList().getField("FILESIZE").getInt();

    try {

    ByteArrayOutputStream out = new ByteArrayOutputStream();

    for (int i = 0; i <= sapTable.getNumRows(); i++) {


    String s = sapTable.getString("LINE");

    int toFill = 255 - s.length();

    if (toFill > 0){

    char[] fillArray = new char[toFill];

    Arrays.fill(fillArray, ' ');

    s = s + new String(fillArray);




    } catch ...

    Please let me know if you found out a more sophisticated workaround.

    Best regards


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Iris,

      I solved the problem as well. Instead of sending a PDF-file filled up in a table, we converted the the otf to HEX. So nothing get lost.

      I thought about your way, but in my case sometimes the length has been even 254 in very rare cases... and the blanks where sometimes in the middle of the string.

      If you wanna get more detailed information, please let me know...

      Kind regards, Jens

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.