PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD18] How to include a pdf file in a XML file.
[WD18] How to include a pdf file in a XML file.
Débuté par Gianni Spano, 23 mai 2015 23:00 - 2 réponses
Posté le 23 mai 2015 - 23:00
Hello to All

I need to include a pdf file (or other file type ie. gif, tiff,jpg) in a XML file as an attachment.

The pdf file must be included in "xs:base64binary" format.

Pls, who want to explain me in details what do i need to do this operation??
Is there some function that i don't know in Windev?

Example are welcome.

Thanks in advance
Gianni
Posté le 24 mai 2015 - 00:53
Hi Gianni

if I remember correctly, the crypt function has a mode that give base64 as a result (see help for details)... So you load your binary file in a buffer, use crypt tp generate a string in base64, then add that string at the appropriate place in your xml file

Best regards
Posté le 24 mai 2015 - 11:45
Hi Fabrice

Yes...This is the solution i thought.
After my post i found the "fcrypt" function that do the trick.
I did a little test and the file can be "attached" in the XML file...

Thanks
Gianni