Hello,
I have created an ASPOSE word document on the server and I am trying to send it to the client as a downloadable PDF file.
I have been using the following solution below for awhile which works fine, but I want to be able to have the same solution using the new functionality of ASPOSE.Words.Document.SaveToPDF(). Can you please provide me with an equivalent solution that opens the document (without saving it) in Acrobat on the client.
'Save the document in Aspose.Pdf.Xml format into a memory stream.
Dim xmlStream As MemoryStream = New MemoryStream
doc.Save(xmlStream, SaveFormat.AsposePdf)
'Seek to the beginning so it can be read by XmlDocument.
xmlStream.Seek(0, SeekOrigin.Begin)
'Load the XML document into Aspose.Pdf
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
'Make sure the images that were saved by Aspose.Words into Windows temporary
'folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = True
pdf.BindXML(xmlStream, Nothing)
'*** Aspose.Pdf font cache, see comments below.
pdf.IsTruetypeFontMapCached = False
'If you convert to PDF multiple files in your application,
'uncomment the following lines to improve the speed of conversion.
'pdf.IsTruetypeFontMapCached = true;
'pdf.TruetypeFontMapPath =
'Now produce the PDF file.
pdf.Save(title & ".pdf", Aspose.Pdf.SaveType.OpenInAcrobat, Response)
Thank You,
Andy