configure html2pdf print margins

Asked

Viewed 335 times

0

I am using html2pdf, but I am not able to increase the printing margin. In my html I put <table align="center" cellspacing=0 cellpadding=0 border=0 so that everything is centralized. The maximum size I can put for the table is 670 getting like this:

<table align="center" cellspacing=0 cellpadding=0 border=0> 
<tr>
  <td  width=335></td>
  <td  width=335></td>
</tr> 
</tr> 

When I put values above 670 it gets decentralized. Would there be any configuration in htm2PDF that could be modified to improve this? In the examples I sought html2pdf he says to modify the $html2pdf = new HTML2PDF('P','A4','pt', array(0, 0, 0, 0)); I made changes, but they didn’t work.

1 answer

0


Solved, to configure html2pdf to generate the html pdf, we use tags:

<page backtop="10mm" backbottom="2mm" backleft="1mm" backright="1mm">
</page>

the configuration can be done in

backtop="10mm" backbottom="2mm" backleft="1mm" backright="1mm"

so that way you can configure the printing margin of the document

Browser other questions tagged

You are not signed in. Login or sign up in order to post.