Forum


Replies: 4   Views: 4435
Why does phpdocx transformdocument to pdf sometimes sets different permission?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by alerts@dalescott.com  · 23-06-2014 - 03:55

Hi Folks, Just bought Corporate and trying to roll out my first project. The project steps are the following: Load data array of 50 clients that need documents. For each of 10 different docx templates { 1) Create docx from template. 2) Transform docx to PDF. 3) Copy PDF to another folder. } I'm running into a frustrating problem on step 2 where transformDocument from docx to PDF will generate a PDF with permission of 600 (rw-------) instead of the normal 644 rw-r--r--. The end result is that an error is generated on the next step when trying to copy the file to another folder: "failed to open stream: Permission denied." The script runs fine for a dozen records or so and then generates a PDF that can't copied, stopping the process. If I re-run he same record, the problem persists. If I move to the next record, the scripts runs normally. This points to a problem with certain records, I can;t figure out why. Here is the log for the particular template that is generating the problem files. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Set language: en-US 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Enable compatibility mode. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Importing styles from an external docx. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Set DOCX name to: DistrictDocsTemp/33-67223-Riverside-Community-College-3-Note-2014-15FY. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Set DOCX name to: DistrictDocsTemp/33-67223-Riverside-Community-College-3-Note-2014-15FY. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Remove existing template tags. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Add word/document.xml content to DOCX file. 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Close ZIP file 2014-06-22T19:15:14-07:00 phpdocx_logger INFO Copy DOCX file using a new name.