Convert Outlook msg to PDF
Project description
Converts Outlook .msg files to PDF
msgtopdf
is a Python 3 module to convert Outlook .msg
files to PDF and extract the attachments. Unlike the majority of current modules msgtopdf maintains the formatting of HTML and RTF messages and embeds any inline images in the PDF output.
As the module used the win32com
library the host machine must have Outlook installed.
msgtopdf
uses the wkhtmltopdf tool to convert the HTML message to PDF and wkhtmltopdf must be installed separately.
Currently msgtopdf
extracts the message body and attachments to a new subfolder named using the emails subject.
Usage
Example usage is provided in the tests/example.py
file. The next plan on the timeline is to create a command line tool in which the user provides either a filename -f
or directory -d
and msgtopdf
will process either a single msg
file or all msg
files in a directory.
Requirements
Install the Windows binary release of wkhtmltopdf
Ensure that wkhtmltopdf
command is found in your PATH
.
This can be tested by entering wkhtmltopdf --version
in your Command Prompt.
You should receive and output similar to the attached.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>wkhtmltopdf --version
wkhtmltopdf 0.12.5 (with patched qt)
C:\>
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
Built Distribution
File details
Details for the file msgtopdf-0.0.1.tar.gz
.
File metadata
- Download URL: msgtopdf-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 095421d444ba2ded4e5421301abce0dc53ecb27ecf723c40d61bec1a6f86a089 |
|
MD5 | 8e3df6d4ae5462c4dc5c2d4a0d130f0f |
|
BLAKE2b-256 | f950849f42989e352dce435e2c1c21b92aaa73539e7981d33c300d942d1c56cb |
File details
Details for the file msgtopdf-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: msgtopdf-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35d3db869c158b2bb038ee7e11c9740f29414071bb8e8c564846b3974cb6c1f7 |
|
MD5 | a2b2d81155b4a1cd7e0c83c38bf24a25 |
|
BLAKE2b-256 | 9f853d32cd44656ca1846404feddb171214c286f80efca96458481e103cf6f8a |