- 
  Notifications
 You must be signed in to change notification settings 
- Fork 167
 
 Please help PS 2 PDF
 
 #118
 
 -
Please help PS 2 PDF
I need to make the request correctly so that I can convert the postscript file into PDF.
I'm interested in how to complete the request.
For example like this:
switches.Add("-dBATCH");
switches.Add("-dNOPAUSE");
Beta Was this translation helpful? Give feedback.
All reactions
 
 
 Answered by
 
 veb86
 
 
 
 Nov 13, 2023 
 
 
 Issue resolved:
 List<string> switches = new List<string>();
 switches.Add("-dBATCH");
 switches.Add("-dSAFER");
 switches.Add("-dNOPAUSE");
 switches.Add("-q");
 switches.Add("-sDEVICE=pdfwrite");
 switches.Add("-sOutputFile=" + outputFileName+".pdf");
 switches.Add("-c");
 switches.Add("...Replies: 1 comment
-
Issue resolved:
 List<string> switches = new List<string>();
 switches.Add("-dBATCH");
 switches.Add("-dSAFER");
 switches.Add("-dNOPAUSE");
 switches.Add("-q");
 switches.Add("-sDEVICE=pdfwrite");
 switches.Add("-sOutputFile=" + outputFileName+".pdf");
 switches.Add("-c");
 switches.Add("-f");
 switches.Add(outputFileName);
 // create a new instance of the GhostscriptProcessor
 using (GhostscriptProcessor processor = new GhostscriptProcessor())
 {
 // start processing pdf file
 processor.StartProcessing(switches.ToArray(), null);
 }
Beta Was this translation helpful? Give feedback.
All reactions
 
 0 replies
 
 
 
 Answer selected by
 veb86
 
 Sign up for free
 to join this conversation on GitHub.
 Already have an account?
 Sign in to comment