lpaulsen93 / dokuwiki-plugin-odt

Exports a page to the Open Document format used by OpenOffice.org and other word processors
http://www.dokuwiki.org/plugin:odt
13 stars 26 forks source link

Fixes SVG image width/height calc, Disable Timeout for Bookcreator export and Wrap inside ordered/unordered lists #296

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

The code was updated to fetch remote images using DokuWiki HTTPClient. The simplexml_load_file allows you to specify a SVG file path or load it's XML content inline, so file_exists verification was breaking the _addStringAsSVGImage() public function which calls getImageSize to get inline SVG image size. This commit also returns width and height 0 if size can't be calculated as getimagesize does.

This commit also disable PHP timeouts issue with larger wikis when exporting multiple pages to ODT with Bookcreator (this piece of code was based on Dw2Pdf code).

This commit also includes small fixes for PHP 8 Warning for non-defined variables error and the rendering of Wrap plugin on ordered/unordered lists (#297).

Klap-in commented 1 year ago

Is this fine to merge for you? Did you also test with other images than svg?

eduardomozart commented 1 year ago

Is this fine to merge for you? Did you also test with other images than svg?

Yes. SVG embedding is still broken, but it didn't seem to be related to these fixes. It seems that the function _addStringAsSVGImage is broken. I will create a bug report and attempt to fix it when I have time. But it's working as expected with other image files.