Link to home
Start Free TrialLog in
Avatar of Adam D
Adam D

asked on

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

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
Avatar of Kimputer
Kimputer

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.
Avatar of Adam D

ASKER

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. :)
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.
Avatar of Adam D

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Adam D
Adam D

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial