Cross-platform LibreOffice document conversion and printing
Headless (command line) operations on Word, Excel, Powerpoint and most other formats LibreOffice can handle for:
- Doc => PDF conversion (LibreOffice only)
- printing (to the system default printer only)
from Python command line using LibreOffice or Microsoft Word
.doc / .docx to PDF conversion
Convert a directory of .doc / .docx to .pdf by:
The doc2print.py script can print an unlimited number of pages to an unwanted printer, possibly causing great expense or violation of private documents to a public printer. Use great care with these scripts, preferably to a local non-networked printer you are sitting next to.
-exe parameter allows selecting the printing program.
The script does not check that the files can be printed appropriately, it just prints.
Thus use the
-s parameter to select only the suffixes wanted.
For example to print all Markdown files in a directory with Notepad++:
doc2print ~/mydocs -s .md -exe notepad++
Since the command-line globbing of LibreOffice conversion is broken, this program provides a sane workaround for mass document conversion using LibreOffice. LibreOffice is not thread-safe, so documents are converted or printed one at a time.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size loutils-1.3.1.tar.gz (5.0 kB)||File type Source||Python version None||Upload date||Hashes View|