ABCPDF not showing full table data

后端 未结 2 1752
天涯浪人
天涯浪人 2020-12-21 22:59

Please refer to the image below:

\"enter

It\'s cutting off some of the table d

2条回答
  •  生来不讨喜
    2020-12-21 23:40

    After reviewing the HTML, I think that I can give you a few tips on how to resolve your issue:

    1- Use the Gecko Engine for PDF Rendering:

    doc.HtmlOptions.Engine = WebSupergoo.ABCpdf9.EngineType.Gecko;
    

    The Gecko Engine provides better Css compliance when rendering in ABCPdf.

    2- In your Css you have overflow-x set to scroll for the inner-container. This causing the behavior that you are seeing. I would add the following Css to the bottom of the Css:

    @media print
    {
        .outer-container {
            background-color: #ccc;
            position: absolute;
            top:0;
            left: 0;
            right: 300px;
            bottom:40px;
            overflow: visible;
            width: 100%;
        }
        .inner-container {
            width: 100%;
            height: 100%;
            position: relative;
            overflow-x: visible;
    
        }
    
        table
        {
            width: 100%;
        }
    }
    

    Notice the @media print which makes the css only effective during print and would not affect that way it shows on the screen.

    3- Finally, you can try playing with the browser width:

    doc.HtmlOptions.BrowserWidth = 1200;
    

    The only problem with the BrowserWidth property is that it will affect the zoom on the document. All the text fonts will appear smaller.

    Good luck...

提交回复
热议问题