on 12-11-2003 8:12 PM
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
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++) {
sapTable.setRow(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);
}
out.write(s.getBytes());
}
} catch ...
Please let me know if you found out a more sophisticated workaround.
Best regards
Iris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.