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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:54:43+00:00 2026-05-11T20:54:43+00:00

We have an application that basically archives files and we give the user the

  • 0

We have an application that basically archives files and we give the user the possibility to print these files. They can be .txt, .doc, .pdf, .jpg nothing fancy.
Is there a .NET way to send these files to the printer without handling them further, ie opening them?

I already tried creating a process with the StartInfo.Verb = “print”

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.FileName = fileName;
p.StartInfo.Verb = "print"
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden

p.Start();

It still opens the file which I don’t want. Can someone help?

Any help would be appreciated.
Tobi

  • 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-11T20:54:43+00:00Added an answer on May 11, 2026 at 8:54 pm

    My understanding is that most apps will open (even briefly) when you print. Try right-clicking a MS Word document and hitting print. You’ll see Word open, print, and close.

    However, you might want to add this to your code to keep the process hidden and to close when finished:

    p.Start();
    p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    if (p.HasExited == false)
    {
       p.WaitForExit(10000);
    }
    
    p.EnableRaisingEvents = true;
    p.CloseMainWindow();
    p.Close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that shows data from a MySQL table. Basically, my application
I have basically a bare-bones rails 3.1 application that I want to deploy to
I have a Java program that generates Java classes for my application. Basically it
I have application that is up more than 3 days. I can see in
I have written an application that basically gathers up a bunch of text and
I have just made my first proper little desktop GUI application that basically wraps
Basically I have two applications: a PHP web application that runs over Apache and
I have a long-running application that basically: read packets off network save it somewhere
I have an application I am writing for Android that basically does a screen
The question is basically contained in the title. Say you have an application that

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.