PDF for Documents are stored in ad_archive
but if a user uploads a file to a record its stored in ad_attachmententry
select ad_wf_node_template_id,e.filename,e.binarydata from AD_WF_Node_Template adwftemp
left join ad_attachment_multiref fileref on fileref.ad_table_id=get_table_id('AD_WF_Node_Template') and fileref.record_id= adwftemp.ad_wf_node_template_id
left JOIN ad_attachmententry e ON e.ad_attachmententry_id = fileref.ad_attachmententry_id
metasfresh=# COPY (SELECT binarydata from ad_archive limit 1) TO E'/tmp/youroutputfile.zip' (FORMAT binary);
zip -FFv youroutputfile.zip --out fixed.zip
Copy the file fixed.zip to your Computer and unzip it into AdempiereArchive
.
Rename AdempiereArchive
to AdempiereArchive.PDF
Open AdempiereArchive.PDF
using PDF Viewer