1

I have to generate PDF dynamically using C# code. The PDF is complex one and i want suggestion from best minds how to proceed and which way would be best.

Scenario: The PDF will be having lot of data and i have to loop through to genrate certain section of pdf for few logics.

Am having XML and XSLT to generate PDF by using C# and TallComponents pdfkit dll. The XML already coming to me is generated by other application and i have to add more xml nodes along with existing xml to satisfy my needs.

Since i have structral design probelm in partially generated PDF, i have to create html dynamically and then append html into already available XML. Then this xml is converted to pdf by applying xslt.

How to create Html dynamically is my big question now. I have already written code to convert Html to XML nodes and what i have mentioned is good way to go?

Govind
  • 979
  • 4
  • 14
  • 45

1 Answers1

1

You can have a look on Convert HTML to PDF in .NET You have more options available than on GOOGLE. :D

Apart from that my suggestion would be Spire.Office for .NET 2.12.4 It does have includes Conversion for Spire.Doc, Spire XLS, Spire.Presentation, Spire.PDF, Spire.DataExport, Spire.PDFViewer, Spire.DocViewer and Spire.BarCode. Spire.Office contains the most up-to-date versions of the above .NET components.

With Spire.Office for .NET, developers can create a wide range of applications. It enables developers to open, create, modify, convert, print, View MS Word, Excel, PowerPoint and PDF documents. Furthermore, it allows users to export data to popular files such as MS Word/Excel/RTF/Access, PowerPoint, PDF, XPS, HTML, XML, Text, CSV, DBF, Clipboard, SYLK, etc.

Community
  • 1
  • 1
Mohit S
  • 13,723
  • 6
  • 34
  • 69
  • I have to create pdf from XML using XSLT. bcoz my xml has all required data for pdf. I want to generate html which will be appended to xml again then convert it to pdf atlast.. – Govind Sep 29 '15 at 04:03
  • @Govind: You can probably check [Converting XML to HTML using XSL](http://www.htmlgoodies.com/beyond/xml/converting-xml-to-html-using-xsl.html) and after this conversion you can imply Spire. Since it provides almost every kind of conversion to PDF required. – Mohit S Sep 29 '15 at 04:11
  • Thanks i will try, by the way , could suggest me how to create html dynamically from c# object. This html is converted to xml nodes. Then i hav to covert whole html to pdf using spire. – Govind Sep 29 '15 at 04:16
  • @Govind: You can have a look on [Rendering C# Objects to Html](http://stackoverflow.com/q/908181/3796048) and [HTML Renderer for WPF](https://www.nuget.org/packages/HtmlRenderer.WPF) – Mohit S Sep 29 '15 at 04:21
  • @Govind: I hope this has resolved the issue. if it does than accept it as answer. You can always thanks by upvoting the answer. – Mohit S Sep 29 '15 at 06:03