locked
Nuget package for Word, Pdf generation RRS feed

  • Question

  • User842257015 posted

    Hi All,

    I have to develop an API method to generate word and pdf document and send to the requested client, here I used .net core framework and have basic word template with place holder text(Replaceable text). 

    There is any nuget package to support for find and replace the dynamic text to the place holder in the document,  create pdf too for the same update document.

    Thanks, 

    Tuesday, April 9, 2019 2:54 PM

All replies

  • User36583972 posted


    Hi jayakumar,

    You can try to search in NuGet Gallery | Packages matching DOCX , Pdf

    If you have any question about ASP.NET Core, please go to the ASP.NET Core forum

    Best Regards

    Yong Lu

    Wednesday, April 10, 2019 9:17 AM
  • User928749814 posted

    There is a nuget package called Spire.Doc for .NET that might suffice your requirement like supporting .net core framework, finding and replacing text in word and converting to pdf etc.. I would also like to mention Spire.Doc for .NET is a commercial & also a multi-functional library, but it's not very expensive compared to other products in the markets which provide the same functionalities. You can download for a free trial from nuget via this link if interested:

    https://www.nuget.org/packages/Spire.Doc/

    Wednesday, April 17, 2019 8:31 AM
  • User61956409 posted

    Hi Jayakumar Vinayagam,

    [iText 7](https://www.nuget.org/packages/itext7/7.1.6) allows us to build custom PDF scenarios, you can try it. And the following code snippet works for me, you can refer to it.

    FileInfo dest = new FileInfo(path);
    
    var writer = new PdfWriter(dest);
    var pdf = new PdfDocument(writer);
    var document = new Document(pdf);
    document.Add(new Paragraph("hello world"));
    document.Close();

    Besides, as other suggested, you can also search and get more nuget packages through your favorite search engine.

    With Regards, 

    Fei Han

    Tuesday, April 30, 2019 3:27 AM