Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert single one worksheet to PDF #3

Open
tonyski opened this issue Dec 26, 2017 · 4 comments
Open

How to convert single one worksheet to PDF #3

tonyski opened this issue Dec 26, 2017 · 4 comments

Comments

@tonyski
Copy link

tonyski commented Dec 26, 2017

I used to search on Google abort how to convert single one worksheet to PDF with Libreoffice,but I did not get the answer.Do you know some idea abort this problem?
And thanks for your package!

@tonyski tonyski changed the title How to convert single one worksheet to pdf How to convert single one worksheet to PDF Dec 26, 2017
@breadlesscode
Copy link
Owner

Hi,

this package does not support such function, but I think you can achieve this by using a macro.

Here is an example for converting the correct sheet to CSV.
https://stackoverflow.com/questions/35988515/libreoffice-convert-all-specific-sheets-from-excel-to-csv

If you have a nice solution, let me know!

@1357280829
Copy link

I tried to create a demo for converting the doc file to PDF with Libreoffice, but it can't work successfully. How should I do is right?Here are my code.

use Breadlesscode\Office\Converter;

$file =  './aaa.doc';
Converter::file($file)
    ->save('./demo.pdf');

In addition, the README.md has an error. The word 'conveter' of the composer command composer require breadlesscode/office-conveter is missing a 'r'. It should be 'converter'.

Thanks for your package!

@breadlesscode
Copy link
Owner

Thanks, can you open a new issue for that?

I will have a look at this Problem :)

@zurimc
Copy link

zurimc commented Sep 3, 2020

I tried to create a demo for converting the doc file to PDF with Libreoffice, but it can't work successfully. How should I do is right?Here are my code.

use Breadlesscode\Office\Converter;

Converter::file('Documento2.docx')
->setLibreofficeBinaryPath('/usr/bin/libreoffice') // binary to the libreoffice binary

->save('Documento2.pdf');

but i have an error!
please help me

Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command "'/usr/bin/libreoffice' --headless --convert-to 'pdf' --outdir '.' /opt/lampp/htdocs/sefaureo2.5/sources/ajax/Documento2.docx" failed. Exit Code: 1(General error) Working directory: /opt/lampp/htdocs/sefaureo2.5/sources/ajax Output: ================ Error Output: ================ /usr/lib/libreoffice/program/oosplash

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

No branches or pull requests

4 participants