Converting Twitter bootstrap page into PDF with wkhtmltopdf : span issue

后端 未结 3 857
执念已碎
执念已碎 2020-12-25 12:57

I am using Symfony2 Bundle KnpSnappyBundle to convert an html twig template to a pdf.

KnpSnappyBundle is base on Snappy wrapper, that use wkhtmltopdf.

My tem

3条回答
  •  一个人的身影
    2020-12-25 13:34

    I know that this question is old but this problem still occurs. In a recent Laravel 5.8 and Twitter Bootstrap 4.0.0 project. I managed to use .col-md .col and getting perfect results by doing the following:

    In adding --viewport-size 1024x768 argument on config/snappy.php

         'pdf' => array(
            'enabled' => true,
            'binary' => "C:\wkhtmltopdf\bin\wkhtmltopdf --viewport-size 1024x768",
            'timeout' => false,
            'options' => array(),
            'env' => array(),
        )
    

    Then on your view use .col-md or .col without any problems.

    Note, include Bootstrap 4 to your HTML using public path.

    //Laravel
    
    

提交回复
热议问题