Skip to content

setImage Still broken even after patch #16

Description

@ArielZamparini-REISys

I have just started to use this library and found the same issue as others are reporting.

I was able to fix the affected code by changing the _save function with the following lines. The issue seems to be that the manifest files need the file entry within the manifest namespace and I fixed it simply by replacing:

$this->manifestXml = substr_replace($this->manifestXml, "\n".$manifdata, $lastpos+1, 0);

WITH

$replace = '<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>'; $this->manifestXml = str_replace($replace, $replace . "\n" . $manifdata, $this->manifestXml);

This is after the comment "// Place content of $manifdata variable in manifest.xml file at appropriate place"

This very simply moves the file entry to WITHIN the manifest:manifest xml namespace. This fixes the odt file corruption message for me when adding images to odt templates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions