I’m new in Talend and I have an issue. I want to extract a PDF file of a postgresql server (Blob column) and transform the binary file in a text file with Talend Open Studio to read the contain of the PDF file.
I will explain my way now :
This is my postgresql table.
Table name : attached_file
I extracted the file with the SQL request :
COPY (SELECT data FROM attached_file WHERE id = 2) TO ‘D:/_users/BMI/testpdf.txt’ (FORMAT binary);
I heard that to open the binary file, I must use a tFileInputRaw composant with the “Read the file as a bytes array” mode. However, I’m blocked for the output to create the final file.
Solved! Go to Solution.
You need to go with a tJavaXxxx component for this purpose (I think so).
Search for "java convert binary to pdf" with Google, it will give you some examples: