Hi,
How can we export the .docx file to pdf. Please help me with some code.
Eg.. If i upload a resume with .docx file and it should store it as a pdf file.
Any help would be highly appreciated.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jay ParekhRank #1,395 · 1.2K reputationPosted Mar 5, 2013, 12:12 AM EST
wordDocument = appWord.Documents.Open(DocFrom.docx");
wordDocument.ExportAsFixedFormat(DocTo.pdf", WdExportFormat.wdExportFormatPDF);
may be it will help.
Neboja12 reputationPosted Jul 17, 2014, 3:40 AM EDT
So here is a way that you can convert your DOCX resume into a PDF version within any C# app, also you will notice that that Save method will actually export your PDF to ASP.NET client (aka browser's client):
DocumentModel doc = DocumentModel.Load("CV.docx", LoadOptions.DocxDefault);
doc.Save(this.Response, "CV.pdf", SaveOptions.PdfDefault);
The code uses this C# component for word processing, you can also find other .NET samples of DOCX processing tasks that you can achieve with it.
Rahul PrasadRank #2,557 · 546 reputationPosted Jul 28, 2014, 10:22 PM EDT
Try C# sample for converting Word to PDF on MSDN ,sample code is available within the package uploaded.And this solution is based on free C# Word component..Good luck