Xml and xsl to PDF

I have xml and I want to use xsl to capture
All of the value from xml to populate the field in PDF

How can I do that in c#?

Thanks
LVL 1
ITsolutionWizardAsked:
Who is Participating?
 
Rikin ShahConnect With a Mentor Microsoft Dynamics CRM ConsultantCommented:
Hi,

You can use - https://www.nrecosite.com/pdf_generator_net.aspx library to convert to pdf.

//Create the XslTransform object.
XslTransform xslt = new XslTransform();

//Load the stylesheet.
xslt.Load(@"C:\customer.xsl");
string xmlString = System.IO.File.ReadAllText(@"C:\TestXML.xml");
var pdfBytes = (new NReco.PdfGenerator.HtmlToPdfConverter()).GeneratePdf(xmlString);
return File(pdfBytes, "application/pdf");

Open in new window

0
 
ITsolutionWizardAuthor Commented:
Any helps?
0
 
ITsolutionWizardAuthor Commented:
Any helps
0
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Only comment with a solution!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.