Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
/*
input_row.docData is the field which holds the base64 encoded pdf.
In de advanced tab I have the following imports:
import java.io.*;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
*/
BASE64Decoder decoder = new BASE64Decoder();
byte[] decodedBytes = decoder.decodeBuffer(input_row.docData);
if (decodedBytes!=null)
{
File file = new File(new_filename);;
file.getParentFile().mkdirs();
FileOutputStream fop = new FileOutputStream(file);
fop.write(decodedBytes);
fop.flush();
fop.close();
}