KnpLabs / KnpSnappyBundle

Easily create PDF and images in Symfony by converting html using webkit
http://knplabs.com
MIT License
1.24k stars 143 forks source link

Please update the README For Symfony 4+ users !! Unusable right now ! #270

Closed kaamui closed 4 years ago

kaamui commented 4 years ago

I generally make more conventional issue titles but I can no longer understand why the documentation is not updated at all since Symfony 2...

Where's the description of how to add it to services ?

Why do I have to find the following code on other sites to make the config work ??

# app/config/config.yml (or config/packages/knp_snappy.yaml if using Symfony4 and the Flex recipe)
knp_snappy:
    pdf:
        enabled:    true
        binary:     '%env(WKHTMLTOPDF_PATH)%'
        options:    []
    image:
        enabled:    true
        binary:     '%env(WKHTMLTOIMAGE_PATH)%'
        options:    []

How can I use autowiring ? etc, etc, etc...

I use this bundle for a while now, but at every new project I have to make some pdf generation, I struggle during hours with the installation, just because the documentation is left out-dated ...

Please update it with simple and usable instructions to make everybody able to make the example work in a minute.

alexpozzi commented 4 years ago

Hi, I agree with the fact that the documentation should be upgraded and I will work on it as soon as I will have some free time. If, as you are saying, the current documentation makes this bundle unusable and makes you struggle for hours every time you use it, you might consider opening a PR to fix it, I'd be happy to review it. Just remember that this is an open source project maintained by people during their free time and, an issue like this one might not really convince anyone to dedicate free time on it.