Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html table size not fit within a letter size pdf #183

Open
wangzh2k opened this issue Dec 25, 2020 · 2 comments
Open

html table size not fit within a letter size pdf #183

wangzh2k opened this issue Dec 25, 2020 · 2 comments

Comments

@wangzh2k
Copy link

wangzh2k commented Dec 25, 2020

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
Copy link
Author

html2pdf

see the html and rendered pdf snapshots

@Tom-Ge
Copy link

Tom-Ge commented Mar 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants