Skip to content

Images not rendered correctly on LibreOfficeΒ #667

@xprt64

Description

@xprt64

The images are not rendered correctly (at least on LibreOffice), they get enlarged by a few millimeters and thus get fuzzy. I resolved the issue by modifying the width and height attributes from pixels to points in PHPWord_Writer_Word2007_Base::_writeImage() like this:

$objWriter->writeAttribute('style', 'width:'.(0.75 * $width).'pt;height:'.(0.75*$height).'pt');

Environment: Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions