Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert Encode64 text to a PDF

Hello,
Is there a way to convert Encode64 text to a PDF file?
Thank you very much.
Labels (2)
2 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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.