A plugin for PyDocX that resizes images before exporting them to HTML
Python Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pydocxresizeimages
tests
.gitignore
.travis.yml
LICENSE
MANIFEST.in
Makefile
README.rst
requirements.txt
setup.py
tox.ini

README.rst

pydocx-resize-images

Overview

An mixin for PyDocX that resize all the images when converting from .docx to .html

Requirements

  • Python 2.7
  • Works on Linux, Windows, Mac OSX, BSD

Install

The quick way:

pip install pydocxresizeimages

Usage

Here is an example of mixin usage:

from pydocx.export import PyDocXHTMLExporter
from pydocxresizeimages import ResizedImagesExportMixin

class PyDocXHTMLExporterWithResizedImages(ResizedImagesExportMixin, PyDocXHTMLExporter):
    pass

docx_path = 'path/to/file/doc.docx'
exporter = PyDocXHTMLExporterWithResizedImages(docx_path)

html = exporter.export()