Skip to content

Commit

Permalink
windows notepad
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jan 30, 2024
1 parent 969773d commit 488ff6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/loutils/doc2print.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def doc2print(filein: Path, exe: str):
https://support.microsoft.com/en-us/office/command-line-switches-for-microsoft-office-products-079164cd-4ef5-4178-b235-441737deb3a6
We don't use WordPad as it adds an extra page and has difficulty with modern Word docs.
VS Code doesn't have a command line print option.
"""

match exe:
Expand All @@ -28,6 +30,8 @@ def doc2print(filein: Path, exe: str):
cmd = [get_powerpoint_exe(), "/P", str(filein)]
case "notepad++":
cmd = ["notepad++", "-quickPrint", str(filein)]
case "notepad": # Windows Notepad
cmd = ["notepad", "/P", str(filein)]
case "acroread":
cmd = [get_adobe_exe(), "/p", str(filein)]
case _:
Expand All @@ -48,7 +52,7 @@ def doc2print(filein: Path, exe: str):
p.add_argument(
"-exe",
help="printing program",
choices=["libreoffice", "word", "notepad++", "powerpoint", "acroread"],
choices=["libreoffice", "word", "notepad", "notepad++", "powerpoint", "acroread"],
default="libreoffice",
)
P = p.parse_args()
Expand Down

0 comments on commit 488ff6b

Please sign in to comment.