Skip to content

Silently Print #99

Description

@qqw1943

hello.
i am a new c# learner.
when i try to print a pdf file using the example below:

using (GhostscriptProcessor processor = new GhostscriptProcessor())
           {
               List<string> switches = new List<string>();
               switches.Add("-empty");
               switches.Add("-dPrinted");
               switches.Add("-dBATCH");
               switches.Add("-dNOPAUSE");
               switches.Add("-dNOSAFER");
               switches.Add("-dNumCopies=1");
               switches.Add("-sDEVICE=mswinpr2");
               switches.Add("-sOutputFile=%printer%" + printerName);
               switches.Add("-f");
               switches.Add(inputFile);

               processor.StartProcessing(switches.ToArray(), null);
           }

there's always a dialog (see pic in attach files).
but i need a Silently Print,which means no dialog is needed
can i get some help here ? thank you.
QQ截图20220411180751

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions