pontedilana / WeasyPrintBundle

Easily create PDF in Symfony by converting HTML using WeasyPrint
MIT License
32 stars 5 forks source link

Catch up to last API changes #3

Closed BitScout closed 2 years ago

BitScout commented 2 years ago

Currently (I'm using version 56.1) PDF generation doesn't work because Pdf.php sets the default option 'format' => 'pdf' which has been deprecated as a cli parameter, see weasyprint changelog from a year ago:

https://doc.courtbouillon.org/weasyprint/stable/changelog.html#version-53-0

Version 53.0
API changes:
--format and --resolution options have been deprecated, PDF is the only output format supported.

This is first of all documentation of the problem, I might try to create a fix myself.

To improve searchability of this issue, here is the error message I first encountered:

usage: weasyprint [-h] [--version] [-i] [-e ENCODING] [-s STYLESHEET] [-m MEDIA_TYPE] [-u BASE_URL] [-a ATTACHMENT] [-p] [-O {images,fonts,all,none}] [-v] [-d] [-q] input output weasyprint: error: unrecognized arguments: --format

BitScout commented 2 years ago

Ah sorry, I guess this can be closed as the ticket exists here: https://github.com/pontedilana/php-weasyprint/issues/2

BitScout commented 2 years ago

Would it be possible to publish a v1.0.1 that uses pontedilana/php-weasyprint v0.10.1 ?

I'm currently stuck on Symfony 4.

endelwar commented 2 years ago

Hi @BitScout I can look at it and prepare a release next weekend.

endelwar commented 1 year ago

@BitScout I've added a release tag on commit https://github.com/pontedilana/WeasyPrintBundle/commit/d14a64880b0663ced42ecdb97c82ba2419af2895, this should be sufficient to work with Symfony 4.4 and php-weasyprint v0.10.1