With OpenTBS you can merge OpenOffice - LibreOffice and Ms Office documents with PHP using the TinyButStrong template engine. Simple use OpenOffice - LibreOffice or Ms Office to edit your templates : DOCX, XLSX, PPTX, ODT, OSD, ODP and other formats. That is the Natural Template philosophy.
This pull-request addresses the following things on top of #20. The things are only tested with a recent LibreOffice and a text-document. See also issue #16.
change the mime-type of replaced images
zap all images of multi-image frames, typically this addresses PNG previews for vector-images
replace the principal image of multi-image frames with the replacement
optionally use ImageMagick to obtain the image size if GD fails. Only if the IMagick extension is available.
It does not seem to be necessary (at least for LO ...) to generate new preview-images, this seems to be performed when LIbreOffice saves the downloaded document. However, previous could be generated using the ImageMagick integration for PHP.
This pull-request addresses the following things on top of #20. The things are only tested with a recent LibreOffice and a text-document. See also issue #16.
It does not seem to be necessary (at least for LO ...) to generate new preview-images, this seems to be performed when LIbreOffice saves the downloaded document. However, previous could be generated using the ImageMagick integration for PHP.