Skip to content
This repository was archived by the owner on Sep 28, 2018. It is now read-only.
This repository was archived by the owner on Sep 28, 2018. It is now read-only.

An uncaught Exception was encountered Type: RuntimeException #18

Description

@netizenking

I am encountering the above error after executing this statement:

//$temp_file is the .docx file created by phpWord
//res is the name of the .docx file without the extension
Gears\Pdf::convert('C:\xampp\htdocs\yu\\'.$temp_filename, 'C:\xampp\htdocs\yu\\'.$res.'.pdf',
                [
                    'converter' => function()
                    {
                        return new Gears\Pdf\Docx\Converter\LibreOffice
                        ([
                            'binary' => 'C:\Program Files (x86)\LibreOffice 5\program\soffice.exe',
                            'output'=>'C:\xampp\htdocs\yu'                            
                        ]);
                    }
                ]);

My backtrace is as follows:

An uncaught Exception was encountered

Type: RuntimeException

Message: (null)

Filename: C:\xampp\htdocs\yu\vendor\gears\pdf\src\Pdf\Docx\Converter\LibreOffice.php

Line Number: 139

Backtrace:

File: C:\xampp\htdocs\yu\vendor\gears\pdf\src\Pdf\Docx\Backend.php
Line: 115
Function: convertDoc

File: C:\xampp\htdocs\yu\vendor\gears\pdf\src\Pdf.php
Line: 184
Function: generate

File: C:\xampp\htdocs\yu\vendor\gears\pdf\src\Pdf.php
Line: 168
Function: save

File: C:\xampp\htdocs\yu\application\controllers\Applications.php
Line: 255
Function: convert

File: C:\xampp\htdocs\yu\index.php
Line: 317
Function: require_once

When i var_dump $cmd in LibreOffice.php line 123 i get the following:
string(212) "start /wait C:\Program Files (x86)\LibreOffice 5\program\soffice.exe --headless --convert-to pdf:writer_pdf_Export --outdir "C:\xampp\htdocs\yu" "C:\Users\sirben\AppData\Local\Temp\Gea9A67.tmp.docx""
What is it that am doing wrong?

Thank you

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions