none
How to convert a word document to post script. RRS feed

  • Question

  • I need to convert word documents to post script.  The post script file needs to be modified to include printing instructions for a Konica Minolta Bizhup Pro 1200 printer.  This is C# environment.  Word 2010.

    Leonard Swarczinski Software Developer Postal Center International

    Tuesday, September 3, 2013 5:36 PM

Answers

  • Hi Leonard,

    As far as I know, we are not able to save Word document as post script. So I recommend you saving a word document as PDF format instead of PostScript(PostScript vs. PDF).

    Here is code for your reference:

    static void PrintWord()
            {
                object oMissing = Type.Missing;
                word.Application wordapp = new word.Application();
                Microsoft.Office.Interop.Word.Document worddoc = wordapp.Documents.Open("E:/1.docx");
                try
                {
                    string outputfile = "E:/1.pdf";
                    if (!Directory.Exists(outputfile))
                    {
                        DirectoryInfo TheFolder = new DirectoryInfo(outputfile);
                    }
                    worddoc.SaveAs("E:/1.pdf", Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF);
                }
                catch (Exception ex)
                {
                    System.Console.Write(ex.Message);
                }
                finally
                {
                    worddoc.Close();
                    wordapp.Quit();
                }
            }

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 4, 2013 9:13 AM
    Moderator