ABCPDF not showing full table data

China☆狼群 提交于 2019-11-29 17:08:11

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...

You haven't specified if you are converting an HTML page to PDF- but I assume you are. If that is the case, have you looked at the browser width property? Look into the XHTMLOptions object properties- it will help you fine tune the rendering:

http://www.websupergoo.com/helppdfnet/source/5-abcpdf/xhtmloptions/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!