An mixin for PyDocX that resize all the images when converting from .docx to .html
- Python 2.7
- Works on Linux, Windows, Mac OSX, BSD
The quick way:
pip install pydocxresizeimages
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()