Hi,
we use your product to convert RTF file to PDF. attached file is one of our input file.
while Converting this document, formatting of input file is not retained. can you please suggest a solution.
here is the code for the same:
// Open the stream. Read only access is enough for Aspose.Words to load a document.
Stream stream = File.OpenRead(inputFile);
// Instantiate the Workbook object
// Load the entire document into memory
Aspose.Words.Document doc = new Aspose.Words.Document(inputFile);
// You can close the stream now, it is no longer needed because the document is in memory.
stream.Close();
// Convert the document to a different format and save to stream.
using (MemoryStream dstStream = new MemoryStream())
{
doc.Save(dstStream, Aspose.Words.SaveFormat.Pdf);
// Rewind the stream position back to zero so it is ready for the next reader.
dstStream.Position = 0;
File.WriteAllBytes(outputFile, dstStream.ToArray());
}
Thanks,
jayaram