{"action":"created","issue":{"url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/2","repository_url":"https://api.github.com/repos/igorrebega/docx-replacer","labels_url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/2/comments","events_url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/2/events","html_url":"https://github.com/igorrebega/docx-replacer/issues/2","id":312733158,"number":2,"title":"replaceTextToImage not working","user":{"login":"nan4k7","id":8295972,"avatar_url":"https://avatars3.githubusercontent.com/u/8295972?v=4","gravatar_id":"","url":"https://api.github.com/users/nan4k7","html_url":"https://github.com/nan4k7","followers_url":"https://api.github.com/users/nan4k7/followers","following_url":"https://api.github.com/users/nan4k7/following{/other_user}","gists_url":"https://api.github.com/users/nan4k7/gists{/gist_id}","starred_url":"https://api.github.com/users/nan4k7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nan4k7/subscriptions","organizations_url":"https://api.github.com/users/nan4k7/orgs","repos_url":"https://api.github.com/users/nan4k7/repos","events_url":"https://api.github.com/users/nan4k7/events{/privacy}","received_events_url":"https://api.github.com/users/nan4k7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"igorrebega","id":2010915,"avatar_url":"https://avatars3.githubusercontent.com/u/2010915?v=4","gravatar_id":"","url":"https://api.github.com/users/igorrebega","html_url":"https://github.com/igorrebega","followers_url":"https://api.github.com/users/igorrebega/followers","following_url":"https://api.github.com/users/igorrebega/following{/other_user}","gists_url":"https://api.github.com/users/igorrebega/gists{/gist_id}","starred_url":"https://api.github.com/users/igorrebega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorrebega/subscriptions","organizations_url":"https://api.github.com/users/igorrebega/orgs","repos_url":"https://api.github.com/users/igorrebega/repos","events_url":"https://api.github.com/users/igorrebega/events{/privacy}","received_events_url":"https://api.github.com/users/igorrebega/received_events","type":"User","site_admin":false},"assignees":[{"login":"igorrebega","id":2010915,"avatar_url":"https://avatars3.githubusercontent.com/u/2010915?v=4","gravatar_id":"","url":"https://api.github.com/users/igorrebega","html_url":"https://github.com/igorrebega","followers_url":"https://api.github.com/users/igorrebega/followers","following_url":"https://api.github.com/users/igorrebega/following{/other_user}","gists_url":"https://api.github.com/users/igorrebega/gists{/gist_id}","starred_url":"https://api.github.com/users/igorrebega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorrebega/subscriptions","organizations_url":"https://api.github.com/users/igorrebega/orgs","repos_url":"https://api.github.com/users/igorrebega/repos","events_url":"https://api.github.com/users/igorrebega/events{/privacy}","received_events_url":"https://api.github.com/users/igorrebega/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-04-10T00:30:19Z","updated_at":"2018-04-11T08:27:29Z","closed_at":null,"author_association":"NONE","body":"Hi! I'm having problems using \"replaceTextToImage\". Whenever I do that I get a docx that gives me an error when I open it saying:\r\n\r\n> \"We're sorry. We can't open export.docx because we found a problem with its contents.\" Details: \"The file is corrupt and cannot be opened\"\r\n\r\nMy lines of code are:\r\n\r\n```\r\nrequire_once(\"include/docx-replacer/vendor/autoload.php\");\r\n\r\n$file = \"precontratos/\".$castingid.\".docx\";\r\n\r\nif (!file_exists($file))\r\n\tdie(\"not found\");\r\n\r\n$tempFile = \"tmp/\".md5(date(\"ymdHisu\")).\".docx\";\r\ncopy($file, $tempFile) or die(\"error\");\r\n\r\n$docx = new IRebega\\DocxReplacer\\Docx($tempFile);\r\n\r\n$tablaCache = \"imagesCastingsCache/\".$castingid.\".jpg\";\r\n\r\nif (file_exists($tablaCache))\r\n\t$docx->replaceTextToImage(\"{TABLACACHE}\", $tablaCache);\r\nelse\r\n\t$docx->replaceText(\"{TABLACACHE}\", \"\");\r\n```\r\n\r\nAny help would be apreciated. \r\n\r\nI'm attaching the resulting docx. [export.docx](https://github.com/igorrebega/docx-replacer/files/1892384/export.docx)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/comments/380370729","html_url":"https://github.com/igorrebega/docx-replacer/issues/2#issuecomment-380370729","issue_url":"https://api.github.com/repos/igorrebega/docx-replacer/issues/2","id":380370729,"user":{"login":"igorrebega","id":2010915,"avatar_url":"https://avatars3.githubusercontent.com/u/2010915?v=4","gravatar_id":"","url":"https://api.github.com/users/igorrebega","html_url":"https://github.com/igorrebega","followers_url":"https://api.github.com/users/igorrebega/followers","following_url":"https://api.github.com/users/igorrebega/following{/other_user}","gists_url":"https://api.github.com/users/igorrebega/gists{/gist_id}","starred_url":"https://api.github.com/users/igorrebega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorrebega/subscriptions","organizations_url":"https://api.github.com/users/igorrebega/orgs","repos_url":"https://api.github.com/users/igorrebega/repos","events_url":"https://api.github.com/users/igorrebega/events{/privacy}","received_events_url":"https://api.github.com/users/igorrebega/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T08:27:29Z","updated_at":"2018-04-11T08:27:29Z","author_association":"OWNER","body":"Hm, the problem is in my case all works, and the image got updated.\r\n\r\nLooks like the error is about a php-zip library, does a usual text `replaceText`? Because as I can see you have \"word/_rels/document.xml.rels\" file and he is not empty.\r\n\r\n![image](https://user-images.githubusercontent.com/2010915/38604741-fcbb7a90-3d79-11e8-9a4e-38fab68af4cf.png)\r\n\r\nPlease contact me on [t.me/irebega](https://t.me/irebega). I suppose this way we can solve your problem faster"}}
{"actor":{"display_login":"igorrebega"}}