1

I am trying to convert HTML template to PDF using IronPDF's HtmlToPdf().

I have following settings for PdfPrintOptions

Dpi = 600,
EnableJavaScript = true,
PaperOrientation = PdfPrintOptions.PdfPaperOrientation.Landscape,
PaperSize = PdfPrintOptions.PdfPaperSize.A4,
MarginBottom = 10,
MarginRight = 10,
MarginTop = 10,
MarginLeft = 10

In the generated PDF file, Margin for Top and Bottom is applied. But a default margin is seen on Left and Right. It doesn't change after changing option values for MarginLeft and MarginRight.

When PdfPaperOrientation is set as Portrait, all the margins are applied as per the provided values.

Any help would be much appreciated.

Vinit Divekar
  • 774
  • 10
  • 24
  • Were you able to figure out how to resolve this issue? I'm not having the same issue, but could be related. – dmoore1181 Jun 29 '20 at 12:40
  • 1
    @dmoore1181, nope. I raised a ticket and they came back saying put the x margins as 0 and it will work.. But to be honest it is not a solution as I would need some margin there.. So to accommodate my content on a single page I just reduced font size, keeping the margins as they are. – Vinit Divekar Jun 30 '20 at 20:40

0 Answers0