locked
Replace Few Set of words in word document and Convert them in to PDF. Then we need to send that PDF as Attachment RRS feed

  • Question

  • User295297575 posted

    Hi All,

    I need to solution for this implementation.

    1. There is a word document. Which has some invitation template. There we have some Key to replace the words. Example <First Name>. In this I need to replace with by DB values.
    2. After Replacing this. I need to convert the word document into PDF and I need to send them as attachment in email
    3. This I need to implement in ASP.Net MVC Controller side.
    4. Import thing is we should not store word document and PDF document in server. Every thing we have to done in Object only.

    If possible please share the link.

    Note: Currently I am using OpenXml.Wordprocessing

    Thanks for your time in Advance.

    Arun G

    Tuesday, July 16, 2019 3:50 AM

All replies

  • User197322208 posted

    You have described well the problem.

    However, I do not undersand what you need when you say 

    I need to solution for this implementation.

    Do you have a specific problem or do you want a software that does all the job and you want to buy this software ?

    Tuesday, July 16, 2019 5:47 AM
  • User295297575 posted

    Hi ignatandrei,

    Yes. I do have. Actually I need to convert the WordProcessing.OpenXml document object into PDF object on the fly without storing in the server. Just I need code snippet. 

    Thanks

    Tuesday, July 16, 2019 6:33 AM
  • User-2054057000 posted

    Hi All,

    I need to solution for this implementation.

    1. There is a word document. Which has some invitation template. There we have some Key to replace the words. Example <First Name>. In this I need to replace with by DB values.
    2. After Replacing this. I need to convert the word document into PDF and I need to send them as attachment in email
    3. This I need to implement in ASP.Net MVC Controller side.
    4. Import thing is we should not store word document and PDF document in server. Every thing we have to done in Object only.

    If possible please share the link.

    Note: Currently I am using OpenXml.Wordprocessing

    Thanks for your time in Advance.

    Arun G

    You need to create a pdf file from  your asp.net application then you attach this pdf on the email and send it to the user. Finally you delete this pdf from the server. iTextSharp is the perfect package to create pdf files. Please take help from this tutorial - Create a PDF file in ASP.NET

    Tuesday, July 16, 2019 11:04 AM
  • User197322208 posted

    Actually I need to convert the WordProcessing.OpenXml document object into PDF object on the fly without storing in the server.

    As I know , there is not out of the box a solution like that.

    You could

    1. Implement yourself ( this will take some effort . However, if it is a strict format of the document, you can do this by help of some PDF SDK creator software - there are many free on internet)
    2. Buy some other library ( ASPOSE, others...) that knows how to do that for every document.
    Tuesday, July 16, 2019 1:01 PM