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 6246759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:44:59+00:00 2026-05-24T12:44:59+00:00

I am trying to print .pdf and .tif files using C# in windows application.

  • 0

I am trying to print .pdf and .tif files using C# in windows application.

Printing is done successfully, but my problem is Adobe reader is opening in background for pdf files and windows print dialogue opens for tif files.

Actually i will run my method using a service, so these process should occur silently. What can I do to avoid this?

Here is my code

public void PrintDocument(string filepath)
        {

            //PrintDialog pd = new PrintDialog();            
            printProcess.StartInfo.FileName = filepath; 
            //Also tried usecellexcecution=false;
            //Redirect=true; something like this
            printProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            printProcess.StartInfo.Verb = "Print";
            printProcess.StartInfo.CreateNoWindow = true;
            PrinterSettings setting = new PrinterSettings();
            setting.DefaultPageSettings.Landscape = true; 
            printProcess.Start();
            printProcess.CloseMainWindow(); 
        }

I have tried to use RawprinterHelper suggested in MSDN, but it prints junk characters.

  • 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-24T12:45:00+00:00Added an answer on May 24, 2026 at 12:45 pm

    Get the window handle of the pdf process and then hide it or use process class’s windowstyle to minimize it.

    Yes it gets launched because you are using Process.Start.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to silent print PDF files from within a java application (more
I'm trying to print xls file to pdf using soffice on windows machine. i
I am trying to print pdf, ppt, and word documents from my windows service
I'm trying to use Ghostscript 9.02 on Windows 7 to print a PDF to
I'm trying to print a PDF with Python, without opening the PDF viewer application
This seems easy in Linux, but I'm trying to print the names of *.pdf
I'm trying to print Arabic in some PDF documents using the Java code found
I am trying to print Arabic text in cell inside table (in pdf) using
I am trying to print an image file on printer using QWebview but instead
i'm trying to generat pdf files using iText, i want those files to be

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.