HTML-Renderer icon indicating copy to clipboard operation
HTML-Renderer copied to clipboard

html table size not fit within a letter size pdf

Open wangzh2k opened this issue 5 years ago • 2 comments

I am new in HTML-Renderer. I tried many times to fix the table size in html edited in VS html editor in HTML 4.01. However, the table is scaled up and always outside of the letter size pdf. I also defined the size of the table in html codes.

Is there anyway in the HTML-Renderer to fix the table inside the letter pdf size.

Thanks,

    public PDFCombination(string html)
    {
        PdfGenerateConfig config = new PdfGenerateConfig()
        {
            MarginBottom = 25,
            MarginLeft = 20,
            MarginRight = 20,
            MarginTop = 25,
            PageSize = PdfSharp.PageSize.Letter,
            PageOrientation = PdfSharp.PageOrientation.Portrait,
        };
        PdfDocument tempPDFDoc = PdfGenerator.GeneratePdf(html, config);

        tempPDFDoc.Save("temp");
    }

wangzh2k avatar Dec 25 '20 20:12 wangzh2k

html2pdf

see the html and rendered pdf snapshots

wangzh2k avatar Dec 25 '20 20:12 wangzh2k

@wangzh2k
Hi,Did you fixed it? I have the same issue with you .
Thanks!

Tom-Ge avatar Mar 29 '22 08:03 Tom-Ge