0

I using to convert code ;

protected void Page_Load(object sender, EventArgs e)
{
    Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application();
    wordDocument = appWord.Documents.Open(@"D:\desktop\xxxxxx.docx");
    wordDocument.ExportAsFixedFormat(@"D:\desktop\DocTo.pdf", WdExportFormat.wdExportFormatPDF);
}

public Microsoft.Office.Interop.Word.Document wordDocument { get; set; }

But image does not appear in pdf. İmage not show How can i fix it . Thanks for help.

coderman
  • 15
  • 2
  • Is there any kind of error or anything? Please note that using Interop requires having Word installed on the machine, so if you are testing this on your server most likely it isn't installed. – misha130 Dec 11 '15 at 14:31
  • Also please note to Close wordDocument and Quit appWord – misha130 Dec 11 '15 at 14:37
  • 1
    You say "image does not appear in pdf". What image? Please provide more information. If you open this document in Word as a user and save to PDF is the result any different? Which version of Word? – Cindy Meister Dec 11 '15 at 14:57
  • server installed in office 2007.I use close wordDocument appWord.Quit(ref missing, ref missing, ref missing). Look image in word but convert to pdf it doesn't seem pdf. – coderman Dec 11 '15 at 15:17
  • The problem seems to be with your specific document (your approach is correct). You should be able to get this working with other documents. Have you tried that? If you want further help, can you share your document? – Dirk Vollmar Dec 16 '15 at 08:48
  • Check solutions here: http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically – Kumar Jan 11 '17 at 08:11

0 Answers0