winprint - A modern take on the the classic source code printing app from 1988.
Advanced source code and text file printing for PowerShell. The perfect tool for printing source code, web pages, reports generated by legacy systems, documentation, or any text or HTML file. It works interactively or from the command line making it great for single users or whole enterprises.
tab
key).out-winprint
CmdLet is a drop-in replacement for out-printer
.See what version is installed:
PS > out-winprint -verbose
VERBOSE: Out-WinPrint 2.0.5.0 - Copyright Kindel Systems, LLC - https://tig.github.io/winprint
Print a Powershell profile using the default sheet definition and default printer:
Get-Content $profile.CurrentUserAllHosts | winprint -Language powershell
PS > cat Program.cs | wp -PrinterName PDF -Orientation Portrait -Verbose -Title Program.cs
VERBOSE: Out-WinPrint 2.0.5.0 - Copyright Kindel Systems, LLC - https://tig.github.io/winprint
VERBOSE: Printer: PDF
VERBOSE: Paper Size: Letter
VERBOSE: Orientation: Portrait
VERBOSE: Sheet Definition: Default 2-Up (0002a500-0000-0000-c000-000000000046)
VERBOSE: Printing sheet 1
VERBOSE: Printing sheet 2
VERBOSE: Printed a total of 2 sheets.
PS >
The following all do the same thing:
out-winprint -FileName program.cs
wp program.cs
winprint program.cs
cat program.cs | wp -Title "program.cs"
Print all .c
and .h
files in the current directory to the "HP LaserJet" printer, ensuring the {Title
} in the header/footers shows the filename. Present verbose output along the way:
ls .\* -include ('*.c', '*.h') | foreach { cat $_.FullName | out-winPrint -p "HP LaserJet" -title $_.FullName -verbose}
I'm open to pull requests. I'll also take donations, preferably in beer or Scotch.