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

An uncaught Exception was encountered Type: RuntimeException #18

Open
netizenking opened this issue Jul 6, 2017 · 1 comment
Open

Comments

@netizenking
Copy link

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

@shift-reality
Copy link

You use windows. This is not allowed :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants