Skip to main content

Cross-platform LibreOffice document conversion and printing

Project description

LibreOffice Utils

Actions Status PyPi versions PyPi Download stats

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:

doc2pdf ~/Documents

Printing

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.

doc2print ~/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++:

doc2print ~/mydocs -s .md -exe notepad++

Notes

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.

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

loutils-1.3.1.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file loutils-1.3.1.tar.gz.

File metadata

  • Download URL: loutils-1.3.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for loutils-1.3.1.tar.gz
Algorithm Hash digest
SHA256 83989be571ca1def71884c22f6dd2350d2ca77182c8b9269f7f19df5a3fd2962
MD5 e3a2c20fe1c64c0da52b11ed67129381
BLAKE2b-256 184d9c78a82c4abc65774504c81b4465cfae5a182f9021b0e0a56ce643c18cc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page