on 12-21-2010 9:53 AM
Hi All,
i am trying to process a XML and PDF file using Java mapping, it is successful in XML but unable to do for PDF.
below is the code i am using... can any one guide me how to process PDF's..
byte byte1 = 0;
java.io.ByteArrayOutputStream bos = (ByteArrayOutputStream)outputstream;
while((byte1=(byte)inputstream.read())!=-1){
bos.write(byte1);
bos.close();
Thank You,
Madhav
Hi Madhav,
I think instead of going with JAVA mapping you can write a custom adapter module for it.
Ref: /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
/people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
Thanks,
Edited by: Hareenkumar on Dec 21, 2010 11:12 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
it is successfull, i am able to process both PDF and XML files using below code....
byte[] data = new byte[512];
while(inputstream.read(data)>=0) {
outputstream.write(data);
}
outputstream.close();
Thank You,
Madhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> but unable to do for PDF.
What does this mean? Do you get an error, a wrong result, an empty result?
"unable to do" is not very helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.