I’m trying to take a doc file and convert to pdf and send to browser. I can get it to save to a file, but I don’t want to do it this way.
Can you show me the right way of taking a document and doing this?
This is my sample code. I am getting a Specified method is not supported error on the .Save line. I am using the latest dlls and running this in Chrome.
string path = Request.ServerVariables[“APPL_PHYSICAL_PATH”] + “\test\merge1.doc”;
Document resultDoc = new Document(path);
DocumentBuilder builder = new DocumentBuilder(resultDoc);
builder.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
builder.PageSetup.PaperSize = PaperSize.Legal;
builder.PageSetup.VerticalAlignment = PageVerticalAlignment.Center;
builder.MoveToMergeField(“merge1”);
builder.InsertHtml(" **" + DateTime.Now.ToString() + “** ”);
[//resultDoc.Save](https://resultdoc.save/)(“d:\temp\newfile.pdf”);
resultDoc.Save(this.Response.OutputStream, SaveFormat.Pdf);