PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Printing HTML Email Content WD 21
Printing HTML Email Content WD 21
Started by Jeff Graham, Dec., 08 2017 9:12 PM - 2 replies
Posted on December, 08 2017 - 9:12 PM
The only way I can find to print HTML Email content is to use HtmlToRtf function with an rtf control. This causes many more pages in the report than if the email was printed from the email application. Also any images are lost. I found this technique in the WD 212 WD Email complete example.

Any suggestions for a better technique?
Posted on December, 08 2017 - 9:36 PM
Hi Jeff,

you could try the following :
- use the chromium activeX in a activex field (there is an example in the french forum, or on the french depository/pcsoft site)
- load your html in it
- print using the activeX command as pdf
- merge that pdf into your report

Best regards
Posted on December, 09 2017 - 8:01 PM
Thanks for the suggestion, Fabrice.

That made me think about the fact that my email window displays the html ok and there is an HTML control in reports. So I passed the edit control with html contents as a parameter. I used the EDT_Preview..DisplayedValue property and then set the report HTM..Caption property from that parameter. This works acceptably but paging causes issues with large image content.

I still have some kind of character set issues but I can live with that for now. For example:

Quote
Subject: RE: A fix for the Word not opening at the command prompt

Â

Hi Craig

Â