C# - creating and emailing a PDF with graphics from code

Adam D
Adam D used Ask the Experts™
on
I have a c# program I am working in that I did not originally create.  I need to add an email element that will create a PDF with graphics (like the attached) authenticate with an email server (like gmail, microsoft or similar) and send that email to a specified address.

I am not sure where to begin, especially on creating the data based graphic.

Thanks.
weeklyemailpdf.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
The data based graphic will take you the most time. You didn't mention how it's calculated and where the date comes from (database)?
The other parts are the least of your problems right now.
So you're probably better off writing in a VERY detailed manner how the graphic has to be created (who what where how why), and create a gig to get you going.
Adam DIT Solutions Developer

Author

Commented:
Thank Kimputer, but where the data comes from doesn't really matter, does it?

It is coming from a database, but the data, for all intents and purposes, is already here, in the program (ie. I have already retrieved it) but, I am interested in knowing and learning how to create this graphic heavy PDF.

What I need to know, for example, is if I have say the 61% value, how do I create a circle graphic that fills in the circle line (like the picture) 61% around the circle or create a bar graph showing values over a period of x months.

Thanks. :)
Dustin SaundersCo-Founder and Chief Architect
Top Expert 2016

Commented:
You can always put together HTML output with jQuery for nice looking charts.
https://canvasjs.com/jquery-charts/

Then use some commercial library like EVOPDF to convert that to your PDF.
http://www.evopdf.com/

Everything else you can do in code easily enough.
Adam DIT Solutions Developer

Author

Commented:
Thanks for your input Dustin.  Converting HTML to PDF is an idea.  But that "evopdf" option is a bit pricey, but I will do some more research on other methods.
IT Solutions Developer
Commented:
I thought I had closed this question.  A final working method was not determined and I went in another direction.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial