Skip to content

v1.9.0

Compare
Choose a tag to compare
@SebastiaanKlippert SebastiaanKlippert released this 11 Feb 12:51
· 14 commits to master since this release

Margin and page size options can be set with units in wkhtmltopdf.
That was not possible in go-wkhtmltopdf, for the options that support this a "Unit" option has been added.
For example, you can now use pdfg.MarginRightUnit.Set("1mm") to set a margin of 1 millimeter or pdfg.MarginRightUnit.Set("0.5in") for half an inch. pdfg.MarginRight.Set(1) is still available to to set it to 1 mm.
When both options are specified a duplicate agrument error is returned: duplicate argument: --margin-right