web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX 7 HTML tags to PDF

(0) ShareShare
ReportReport
Posted on by 1,099

Hi Experts,

There is a field "Message" in the table SysOutgoingEmailTable. This field has the contents of the e-mail message in HTML (HTML tags)

Is there any possibility, to use the value of this field (HTML tags) and convert into PDF and attach with a mail?

Usually, we use SysMailerMessageBuilder to build an email and use HTMl tags to create email body.

But, the requirement is instead of send the details in email body, customer is expecting the details in PDF as attachment.

Appreciate your help.

Thanks,

N.Sridhar

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,660 Most Valuable Professional on at

    It's possible with some custom code. Attaching a file is trivial; the more complicated part will be generating PDF. There are some .NET libraries that can help you, such as PdfSharp.

  • Sridhar Narayanan Profile Picture
    1,099 on at

    Hi Martin,

    Thanks for your input.

    We are not allowed to use 3rd party libraries. We can either use .NET in built dlls or AX libraries.

    Thanks,

    N.Sridhar

  • Martin Dráb Profile Picture
    239,660 Most Valuable Professional on at

    PdfSharp, for instance, is open source, therefore you can download it and build it by yourself. If you aren't allow to do it either, you should go to the person who forbade it and explain that writing the whole thing again instead of using the already existing and tested solution would be a waste of money.

  • Suggested answer
    Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    Why not you create ssrs report based on that value then print ssrs to PDF and attached it

  • Sridhar Narayanan Profile Picture
    1,099 on at

    Hi Chandra,

    Thanks for your input. We have been doing the way you mentioned; however, there are some performance issue(system is very slow). So we thought of some other approach preferably converting HTML to PDF.

    Thanks,

    N.Sridhar

  • Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    Got it

    Does the infrastructure team allow you to install chrome browser?

    Why not try chrome feature to convert HTML to pdf from command prompt

    developers.google.com/.../headless-chrome

    Combine by calling the bat file from x++

    blogs.msdn.microsoft.com/.../how-to-execute-an-external-process-from-a-batch

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dekion Profile Picture

dekion 4

#2
Virginia99 Profile Picture

Virginia99 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans