First time

hi..
this is my first time using Aspose.word..
i m trying to wirte a simple code which convert an existing .doc file into .pdf.
i m using C# to write an web application to do the conversion.

when i run the code they say tht my document file is already exist.

Error Message:
Server Error in ../layout/PDF Research Application
E:/yingkit.doc already exist.

Aspose.Word.Word wrd = new Word();
Aspose.Word.Document doc = wrd.open(@"E:/yingkit.doc"); <---Error Line
doc.save ( "yingkit.pdf", SaveFormat.FormatAsposePdf);

by the way following the examples above..
where can i find the pdf document after it is converted..
do i need to configure sometihng so tht it can save in prefered location..say in C:\

currently the pdf file is saved in E:/Windows/System32/inetsvr folder

thx you in advance
your help is greatly appreaciated


============================================================
ummm....i know now y there is error...Smile
this is because yingkit.doc is created using Wordpad instead of microsoft word.

from the above observation can i gather tht wrd.open(filename)
opens only .doc files tht is created using Microsoft Word.???

=============================================================

Hi,

You’ve answered your question. I’ve checked WordPad cannot save files in .doc format, it can only save in .rtf and text formats. So you file is probably an .rtf file just renamed into .doc. Aspose.Word does not open .rtf files yet. Yes, create a .doc file in MS Word.

When saving the file you should specify full path, otherwise it gets saved in the current directory.

Aspose.Word does not save directly into .pdf file, it can save the file in Aspose.Pdf.Xml format. That’s an XML file that Aspose.Pdf (our other product) can read and produce .pdf file.

There are code examples how to do the conversion, both in the API documentation and in the demo project included in the product installation.

You need both Aspose.Word and Aspose.Pdf installed to convert from .doc to .pdf.

thx ^^...