Hello there, I see that my post has been moved back to
struts. I have a question. I do think that there is a problem with the code that makes the request to get this pdf. There was a .dll that used to make the call and it was rewritten in
java.
I noticed that there are 8 funky characters before the %PDF and I am pretty sure this is why it is not being rendered properly since when I take them out, the code works properly.
I do not know anything about socket programming. Would anyone be able to interpet the following code or point me in the right direction? I thought it was interesting that the header was playing with an amount of eight but I may be way off.
//Preparing Header
int totalRequestLength = sRequest.length()+8;
byte[] utf8BytesTotalLength = (String.valueOf((char)totalRequestLength)).getBytes("UTF8");
utf8BytesFormattedReqHeader[0] = utf8BytesTotalLength[0];
byte[] utf8BytesRequestLength = (String.valueOf((char)(totalRequestLength-8))).getBytes("UTF8");
utf8BytesFormattedReqHeader[6]=utf8BytesRequestLength[0];
printBytes(utf8BytesFormattedReqHeader, "a1");
Thanks.