ms word - convert Html to doc in c# and return it as binary -


I have this code to convert an html page into the document, but I have a question

  Microsoft.Office.Interop.Word.Application terms = new Microsoft.Office.Interop.Word.Application (); Microsoft.Office.Interop.Word.Document wordDoc = new Microsoft.Office.Interop.Word.Document (); Object oing = system reflection. missing. Value; WordDoc = word.Documents.Add (referencing oMissing, referee oMissing, referee oMissing, referee oMissing); Word.Visible = false; Object file path = "c: \\ pagina.html"; Object Request Conversion = System. reflection. missing. Value; To read the object only = false; Object saveto = "c: \\ doc.pdf"; Object ozbustustation = system reflection. missing. Value; wordDoc = word.Documents.Open (reference Filepath, Confirmconversion ref, ref, read-only, ref oMissing, OMissing referee, referee oMissing, OMissing referee, referee oMissing, OMissing referee, referee oMissing, referee oMissing, OMissing referee, referee oMissing, Referee oMissing, Rif Oming, Rif Oming); Objection fileformat = WdSaveFormat.wdFormatPDF; WordDoc.SaveAs (Ref Seveto, riff file format, Oming riff, riff Oming, riff Oming, Oming riff, riff Oming, Oming riff, riff Oming, Oming riff, riff Oming, Oming riff, riff Omeling, Olouwuskripshn riff, riff Omeling, Referee oMissing);   

How can I save in a variable bytes [], and save as HDD, is it possible?

'I support not sure SaveAs method Memoristrym, why byte after not save file Give as you try to read and then remove it from Harddiwais. line went below will read the file as a byte

  byte [] pdfFile = System.IO.File.ReadAllBytes ( (String) saveto);    

Comments