acid
acid

Reputation: 2149

Knp Snappy Bundle Options

I'm using KnpSnappyBundle for my Symfony project and I'm trying to define some options in my config file. However if I set, for example:

knp_snappy:
    pdf:
        enabled:    true
        binary:     /usr/local/bin/wkhtmltopdf
        options:    [ 'no-outline' ]

I get an error: The option '0' does not exist.

How do I define options for the bundle?

Upvotes: 9

Views: 10122

Answers (2)

Armand
Armand

Reputation: 1

The answer is:

knp_snappy:
    pdf:
        enabled: true
        binary: /path/to/wkhtmltopdf
        options:
            - { name: 'page-size', value: 'A4' }

Upvotes: 0

acid
acid

Reputation: 2149

Well, that was kinda dumb of me. YAML to the answer:

knp_snappy:
    pdf:
        enabled:    true
        binary:     /usr/local/bin/wkhtmltopdf
        options:
            no-outline: true

Upvotes: 15

Related Questions