Hi,
I have another weird question for you guys to break your brains on!
My boss want to have a desktop shortcut that sends a specific textfile (.odt) directly to the printer
(So without opening the file in libre-office and printing it from there) to make it idiot-proof for my colleages.
I have found several options but they all require user interaction like dropping a file in a printer link on the desktop etc.
Thanks in advance for any tips!!
Kevin
Create a link on desktop that prints a specific textfile when clicked
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Create a link on desktop that prints a specific textfile when clicked
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Create a link on desktop that prints a specific textfile when clicked
Command
Test the command first and if it does what you need the next step is to turn it into a script. Scripts usually ask the user what to do with them when executed. It should be simple enough to instead make a short program in a compiled language to call that command so that there is no user confirmation. Any programming languages you already use or have on your system?
libreoffice -p "/path/to/filename.odt"
should hopefully work to print the file to the default printer. If you need to specify a specific printer use libreoffice --pt "printername" "/path/to/filename.odf"
instead.Test the command first and if it does what you need the next step is to turn it into a script. Scripts usually ask the user what to do with them when executed. It should be simple enough to instead make a short program in a compiled language to call that command so that there is no user confirmation. Any programming languages you already use or have on your system?