Forum


Replies: 6   Views: 2124
Problemas con la generación de pdfs
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 rmartinez  · 25-02-2019 - 10:20

Comento:

  1. El valor del directorio HOME del servidor es /root.
  2. Le he asignado permisos 777 a /root/.config/ de manera recursiva
    root@XXXXXX:~/.config# ls -la
    total 11
    drwxrwxrwx  5 root root  5 feb 22 11:42 .
    drwx------ 18 root root 30 feb 25 09:18 ..
    drwxrwxrwx  2 root root  5 jul 10  2018 composer
    drwxrwxrwx  3 root root  3 feb 22 11:42 libreoffice
    drwxrwxrwx  2 root root  3 ago  3  2018 psysh

     

  3. El siguiente código, sí me crea el pdf por modo CLI pero no a través del navegador:
    // instantiate the CreateDocx class in a new object
    require_once '../vendor/phpdocx/Classes/Phpdocx/Create/CreateDocx.php';
    $docx = new Phpdocx\Create\CreateDocx();
    
    // enable the compatibility mode to allow the library to warn us in case of using non-compatible content
    $docx->enableCompatibilityMode();
    
    // add a text to the document
    $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit';
    $docx->addText($text, $paramsText);
    
    // generate the new document
    $docx->createDocx('test.docx');
    
    // and make the transformation to PDF file
    $docx->transformDocument('test.docx', 'test.pdf');

¿Alguna idea más?

Gracias de antemano.

Saludos.