0

when convert html to pdf in wkhtmltopdf. My html works great on landscape view in pdf (wkhtmltopdf) but i want to a4 size pdf. In a4 size doesn't work properly table and other fields.

Neel Patel
  • 11
  • 2
  • 4

1 Answers1

2
$options = array( 
    'page-size' => 'A4',  
    'no-outline',           // option without argument
    'encoding' => 'UTF-8',  // option with argument
    'user-style-sheet' => $cssPath,
    'margin-top'    => 0,
    'margin-right'  => 0,
    'margin-bottom' => 0,
    'margin-left'   => 0,
 );

pass this options and it will create a A4 pdf

Exprator
  • 26,992
  • 6
  • 47
  • 59