PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 8:41 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: HTML to PDF problem
PostPosted: Tue Aug 21, 2018 7:13 pm 
Offline

Joined: Tue Aug 21, 2018 7:05 pm
Posts: 1
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: HTML to PDF problem
PostPosted: Tue Aug 21, 2018 9:21 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Hi!
FanPilot wrote:
Am I missing something here?
You have come to the wrong forum. PDFsharp cannot convert HTML to PDF. You are using a third-party tool that uses PDFsharp internally.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 136 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group