Convert blob to PDF using Java compute

15:02 Unknown 0 Comments


                                                      //Java Code

                   Preconditions:
                        1.Need to use blob parser
                        2.Need to give pdf input
                        3.Need to use java compute node
                        MbElement outerblob = inRoot.getLastChild();
MbElement blob = outerblob.getLastChild();
byte[] mybytes=(byte[]) blob.getValue();

String objFileLocation= "D:\\out.pdf";

OutputStream ostream = new FileOutputStream(objFileLocation);
ostream.write(mybytes);
ostream.close();

You Might Also Like

0 comments: