christopher-ramirez / secretary

Take the power of Jinja2 templates to OpenOffice and LibreOffice.
Other
190 stars 48 forks source link

Added Markdown Image Support #23

Closed bijanebrahimi closed 8 years ago

bijanebrahimi commented 8 years ago

Hi, I just added image support for markdown filter which for my work was very essential. I hope we can work around to find a way to push the changes to your repo to be more publicly available.

The Only thing that I'm not very happy about my design is it uses a _dpi configuration value. apparently ODF uses inch unit over pixel and the only way to resize images (width/height) from markdown to ODT with proper inch values is to use a default dpi which derived from my understanding of dpi concept. Anyhow, i used the dpi of 200 which seemed fine by my tests and offered a customize _dpi configuration for other values!

res=engine.render('simple_template.odt',
                  _dpi=300))

I explained it Here as well!

bijanebrahimi commented 8 years ago

I'm going to close this pull request in favor of another with added bug fixes and tests.