Merge pull request #353 from XtremeGood/master

Added attributes in the documentation for InlineImage
This commit is contained in:
Eric Lapouyade 2021-05-09 09:56:57 +02:00 committed by GitHub
commit 7ac23c81d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,7 @@ Inline image
You can dynamically add one or many images into your document (tested with JPEG and PNG files). You can dynamically add one or many images into your document (tested with JPEG and PNG files).
just add ``{{ <var> }}`` tag in your template where ``<var>`` is an instance of doxtpl.InlineImage:: just add ``{{ <var> }}`` tag in your template where ``<var>`` is an instance of doxtpl.InlineImage::
myimage = InlineImage(tpl,'test_files/python_logo.png',width=Mm(20)) myimage = InlineImage(tpl, image_descriptor='test_files/python_logo.png', width=Mm(20), height=Mm(10))
You just have to specify the template object, the image file path and optionnally width and/or height. You just have to specify the template object, the image file path and optionnally width and/or height.
For height and width you have to use millimeters (Mm), inches (Inches) or points(Pt) class. For height and width you have to use millimeters (Mm), inches (Inches) or points(Pt) class.