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

Black background when you creating PDF (docx work fine) #1888

Closed
fosterushka opened this issue Jun 19, 2020 · 1 comment
Closed

Black background when you creating PDF (docx work fine) #1888

fosterushka opened this issue Jun 19, 2020 · 1 comment

Comments

@fosterushka
Copy link

Describe the Bug

When you create pdf file, background of pdf is black,but with docx everything is fine.

Image pdf

image docx

$template->saveAs($filepath);
        Settings::setPdfRendererPath('vendor/mpdf/mpdf');
        Settings::setPdfRendererName('MPDF');
        $phpWord = IOFactory::load($filepath);
        $xmlWriter = IOFactory::createWriter($phpWord, 'PDF');
        $xmlWriter->save(temp_path('closeDocument.pdf'));

Environment information:

  • PHP Version: 7.2
  • PHPWord Version: 0.17
  • Linux
  • Software for work with documents : Libra 6.4.4
@fosterushka
Copy link
Author

If you're looking for a solution, I recommend that you use this Docker service https://github.com/as-a-service/pdf

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

No branches or pull requests

1 participant