Itext 7 overriding default margin in pdfHtml
问题 I have html content that has to start at the absolute top left corner of the page. However, the HtmlConverter automatically adds a 0.5in gap from the top and left side of the pdf page. How do I override this default margin? 回答1: You can set the margins of a page through CSS using @page. The following declaration sets all the page-margins to 0, as well as draws a border around paragraphs for visual reference: @page{ margin:0pt; } p{ border-left: solid 2pt blue; border-top: solid 1pt blue;