Page 1 of 1

CMIMEENC (pdf-file to mime)

Posted: Thu Jan 14, 2021 3:21 pm
by Marc Vanzegbroeck
Hi,

A want to add a PDF-file into a xml-file with mime (base64) encoded.
How can I add this?
If I use

Code: Select all

CMIMEENC('C:\Users\Marc\Documents\Factuur 20210005.pdf')
then the text 'C:\Users\Marc\Documents\Factuur 20210005.pdf' is converted.
Can I use memoread()? Does this also read the special characters of PDF-file?

Re: CMIMEENC (pdf-file to mime)

Posted: Thu Jan 14, 2021 3:45 pm
by Giovany Vecchi
Use

cResult := Hb_base64Encode(Hb_MemoRead('C:\Users\Marc\Documents\Factuur 20210005.pdf'))