I want to specify the size when I print PDF with LPR command in powershell

Asked 2 years ago, Updated 2 years ago, 87 views

When I print with LPR on Linux, I could print with A5 with -omedia= A5, but Windows (powershell) doesn't work the same way with the same option.
If you change the default size in the printer settings in the device settings, you will ignore it and print it in A4.
Is there any way to print PDF with LPR by specifying the size?
Rather than using LPR, I would like to print PDF by specifying the size from the command line without installing the application, so please let me know if it is a separate solution.

powershell

2022-09-30 20:16

1 Answers

Get-Printer | Set-PrintConfiguration-PaperSize A5

If you run lpr after setting it up like this, you can do it.

Note: https://docs.microsoft.com/ja-jp/powershell/module/printmanagement/set-printconfiguration?view=windowsserver2022-ps


2022-09-30 20:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.