convert Encode64 text to a PDF

One Star

convert Encode64 text to a PDF

Hello,
Is there a way to convert Encode64 text to a PDF file?
Thank you very much.
Four Stars

Re: convert Encode64 text to a PDF

Hi,
Just yesterday I created a piece of code for that.. 
I use a some java inside a job, which just outputs the file in a predefined (via context var) network share:
/*
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();
}

Hope this does the job for you.
Regards,
Dennis
One Star

Re: convert Encode64 text to a PDF

Thank you very much for your answer.
Can you attach me a picture of Talend? Do I need to have any external software installed?
Greetings.