FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CMIMEENC (pdf-file to mime)
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
CMIMEENC (pdf-file to mime)
Posted: Thu Jan 14, 2021 03:21 PM
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 (fw): Select all Collapse
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?
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 244
Joined: Mon Jun 05, 2006 09:39 PM
Re: CMIMEENC (pdf-file to mime)
Posted: Thu Jan 14, 2021 03:45 PM

Use

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

Continue the discussion