Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4267968
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:58:17+00:00 2026-05-21T06:58:17+00:00

hI, Is there any control that prints flow document content to PDF? EDIT: not

  • 0

hI,

Is there any control that prints flow document content to PDF?

EDIT: not a 3rd party control

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:58:18+00:00Added an answer on May 21, 2026 at 6:58 am

    I was able to solve my problem by saving the flowdocument content to .DOCX and converting it to PDF by using Microsoft.Office.Interop.Word

    using moiw = Microsoft.Office.Interop.Word;
    
    
    public static void WordToPDF(string docFileName)
        {
            // Create a new Microsoft Word application object
            moiw.Application word = new moiw.Application();
    
            // C# doesn't have optional arguments so we'll need a dummy value
            object oMissing = Missing.Value;
    
            // Get a Word file
            FileInfo wordFile = new FileInfo(docFileName);
    
            word.Visible = false;
            word.ScreenUpdating = false;
    
            // Cast as Object for word Open method
            Object filename = (Object)wordFile.FullName;
    
            // Use the dummy value as a placeholder for optional arguments
            moiw.Document doc = word.Documents.Open(ref filename, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing);
            doc.Activate();
    
            object outputFileName = wordFile.FullName.Replace(".docx", ".pdf");
            object fileFormat = moiw.WdSaveFormat.wdFormatPDF;
    
            // Save document into PDF Format
            doc.SaveAs(ref outputFileName,
                ref fileFormat, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing);
    
            // Close the Word document, but leave the Word application open.
            // doc has to be cast to type _Document so that it will find the
            // correct Close method.                
            object saveChanges = moiw.WdSaveOptions.wdDoNotSaveChanges;
            ((moiw._Document)doc).Close(ref saveChanges, ref oMissing, ref oMissing);
            doc = null;
    
            // word has to be cast to type _Application so that it will find
            // the correct Quit method.
            ((moiw._Application)word).Quit(ref oMissing, ref oMissing, ref oMissing);
            word = null;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any WPF control (commercial or not) that integrates well with the MVVM
Good morning all. Is there any jsf control that escapes the html tags? Imagine
Are there any free libraries that would print to a PDF without actually having
Is there any way to make two controls that are in different containers the
In ASP.NET, is there any databound control (GridView, DataList, Repeater, ListView etc.) which has
Is there any way to control and manual specification for start of teaser ?.
Is there any free ajax uploading control which can give black-screen on the page
Is there any way to add a ActiveX control to a JPanel.
Is there any (simple) way to get some control of the order in which
Is there any way to see what a control will look like in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.