Hi,
I have a docx file in landscape format that I am populating as a mail merge (using the OpenXML SDK). I am struggling to find a decent (free) docx to pdf convertor, so I am using the OpenXML Power tools to convert it to HTML, as I know that PDFSharp can convert HTML to PDF.
The document is predominantly tables. The HTML is generated fine (mostly fine... it has borders on a table that it shouldn't have, but that is not a PDFSharp issue).
When I come to create a PDF, I have the code...
Code:
PdfGenerateConfig conf = new PdfGenerateConfig();
conf.PageOrientation = PageOrientation.Landscape;
conf.PageSize = PageSize.A4;
conf.SetMargins(32);
PdfDocument pdf = PdfGenerator.GeneratePdf(HtmlString, conf);
pdf.Save(Filename);
but my output PDF is chopping off the right side of the tables, which works out to be about 1/3rd of the document.
Am I missing something here?
Thank you.