WPF: flowdocument to PDF -


Hi,

Is there a control that pdf flow document content print? In

Edit: not a 3rd party control

< p> I was able to Microsoft.Office.Interop.Word

  using moiw = Microsoft.Office the FlowDocument content .DOCX using this PDF To resolve my problem by changing Interop.Word; public static void WordToPDF (string docFileName) {// a new Microsoft Word application object moiw.Application words = Create new moiw.Application (); // There is no alternative argument in C # so we'll need a dummy value object oMissing = Missing Value; // Get a file file FileInfo wordFile = New FileInfo (docFileName); Word.Visible = false; Word.ScreenUpdating = false; // as the Object for the word Open Object Object FileName (object) wordFile.FullName; // Use dummy value as a placeholder for the optional argument moiw.Document Dock = word.Documents.Open (reference file name, referee oMissing, referee oMissing, OMissing referee, referee oMissing, OMissing referee, referee oMissing, ref oMissing, referee oMissing, Oming riff, riff Oming, riff Oming, Oming riff, riff Oming, Oming riff, riff Oming); Doc.Activate (); Object outputFileName = wordFile.FullName.Replace (".docx", ".pdf"); Object file format = moev.website format.wndformat pdf; // Save the document in PDF format doc.SaveAs (Ref outputFileName, Fileformat referee, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, referee oMissing, Rif Oming, Rif Omming, Rif Oming); // Close the Word document, but leave the word application open. // To decrypt the doctor, type _Document so that it will find the correct stop method. Object Save Change = Moive WASHINGWAY OPTION WdDoSaveChanges; (Moov._Document) doc). Close (Riff Save Changes, Rif Omming, Rif Omming); Doctor = null; // The word is so that it will get _Application type // to be correctly inserted exit. (Moiw._Application) .Quit (Ref Omming, Rif Omming, Rif Omming); Word = null; }    

Comments