Cross-platform LibreOffice document conversion and printing
Project description
LibreOffice Utils
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.
These scripts use the command-line interface of LibreOffice or Microsoft Word in a headless (no GUI) fashion.
CAUTION 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.
LibreOffice
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.
Printing
python doc2print.py ~/mydocs
The -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++:
python doc2print.py ~/mydocs -s .md -exe notepad++
See all the programs possible to print with by:
python doc2print.py -h
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file loutils-1.3.0.tar.gz
.
File metadata
- Download URL: loutils-1.3.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77fb1066e474880d980e77292d2cc1ac2d46d4beb15368bf353d911e2daaf3cb |
|
MD5 | 9d2346110c3373794325804d1dee7854 |
|
BLAKE2b-256 | 73c76518eee622ff1f57b7b24b88a651b4f17c35096f57eca0c2dd2edb3d6f07 |