0

I am trying to print photos from my application (Unity3D's game & script language is C# ) and I think using .bat is the simplest way to do that.

Batch file content :

"C:\windows\system32\mspaint.exe" /p "C:\Users\Jason\Documents\UnityProjects\Test-Printing\Assets\test.png"

This allow the application printing photo(screenshot from Unity3D) with mspaint(Microsoft Paint)'s "default print setting".

Is there any way to set print setting through Command Line in order to print photo without "default print setting".

Jason Li
  • 11
  • 1
  • 10
  • `Spring-Batch` is not the same as a `batch-file`. Different languages. – Squashman Mar 15 '18 at 03:32
  • From what I can tell you will not be able to control the print settings unless you use a third party tool. https://stackoverflow.com/questions/2301101/command-line-tool-for-print-picture – Squashman Mar 15 '18 at 03:37
  • @Squashman I tested IrfanView before it allow me change and save the print settings .But it always print one more blank page(photo) so I am trying to use mspaint. – Jason Li Mar 15 '18 at 03:54

1 Answers1

1

The default printer is chosen because the last parameter in your code is omitted, so far, here are the possible parameters:

mspaint /pt [file name] [printer name]

for example:

"C:\windows\system32\mspaint.exe" /p "C:\Users\Jason\Documents\UnityProjects\Test-Printing\Assets\test.png" "Microsoft Print to PDF"

so in short, this should be helpful

"C:\windows\system32\mspaint.exe" /p "C:\Users\Jason\Documents\UnityProjects\Test-Printing\Assets\test.png" "INSERT_NAME_OF_YOUR_PRINTER_HERE"
Dharman
  • 30,962
  • 25
  • 85
  • 135
Miguel P
  • 21
  • 3