csslaravellaravel-snappy

How can I export a fine printer friendly laravel view to PDF with laravel-snappy


I am using Larave-Snappy to converty laravel blade views to PDF. It is working just fine but there are some elements such as the navigation bar that I don't want to be exported to PDF. I have created a print version of CSS which seem only to work for desktop printers but not when I am exporting to PDF. Is there a way I can avoid to export some laravel view blade to PDF with laravel-snappy with wkhtmtopdf. Kindly guide me.


Solution

  • If you set print-media-type to true in your settings, this will use the print media css.

    source: https://github.com/barryvdh/laravel-snappy/issues/25