Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a job whose task is to download a list of PDFs in Salesforce by using an attachment ID. The PDFs are being downloaded, however while opening them I'm getting the error:
While opening the PDF via Notepad++ I'm seeing Base64 String.
While decoding the said Base64 string in an online Base64 to text converter, I'm getting the correct version of the PDF to download and it can be opened correctly.
Here is the job design:
The code in the tJavaRowComponent is:
Hello xdshi,
Thank you for your reply.
The issue I was encountering was that I was unable to decode a byte array directly to Base64 due to the fact that I was forced to use the library sun.misc.BASE64Decoder as Talend 6.4.1 wasn't compiling my code was I tried to use java.util.Base64
To solve it, I had to write the Base64 String to a text file via a tJavaRow, and then read the saved text via another tJavaRow and tFileList and decode it from said Base64 String to get my PDF.
Thank you for your involvement.
Kind regards.
Hello,
Have you tried to use a custom component tFileOutputPDF which is written by talend community user and shared on talend exchange portal?
Best regards
Sabrina
Hello xdshi,
Thank you for your reply.
The issue I was encountering was that I was unable to decode a byte array directly to Base64 due to the fact that I was forced to use the library sun.misc.BASE64Decoder as Talend 6.4.1 wasn't compiling my code was I tried to use java.util.Base64
To solve it, I had to write the Base64 String to a text file via a tJavaRow, and then read the saved text via another tJavaRow and tFileList and decode it from said Base64 String to get my PDF.
Thank you for your involvement.
Kind regards.