Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setImage Still broken even after patch #16

Open
ArielZamparini-REISys opened this issue May 6, 2016 · 0 comments
Open

setImage Still broken even after patch #16

ArielZamparini-REISys opened this issue May 6, 2016 · 0 comments

Comments

@ArielZamparini-REISys
Copy link

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.

stephanmae pushed a commit to stephanmae/odtphp that referenced this issue Mar 21, 2021
stephanmae added a commit to stephanmae/odtphp that referenced this issue Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant