Rotativa generated PDF not respecting UIkit grid

痞子三分冷 提交于 2020-06-17 14:46:48

问题


I want to generate a PDF from an specified view respecting my actual CSS.

<html>
<head>
    <meta charset="utf-8" />
    <style>
        .justify {
            text-align: justify;
            text-rendering: geometricPrecision;
        }

        .center {
            text-align: center;
        }

        body {
            font-size: 15px;
            white-space: normal;
            line-height: 110%;
            text-rendering: geometricPrecision;
        }
        .rightheader {
            font-size: 12px;
        }
        .bigger{
            font-size:18px;
        }

    </style>
    <link href="~/Content/uikit.css" rel="stylesheet" />
    <link href="~/Content/CartaSates.css" rel="stylesheet" />
    <title>

    </title>
</head>
<body style="padding:10px;">
    <div class="uk-grid" style="margin-top:10px;margin-left:0px !important;">
        <div class="uk-width-2-3" style="padding-left:0px;padding-top:0px;">
            <img src="~/src/img/logo.png" style="width:200px" />
        </div>
        <div class="uk-width-1-3 justify" style="padding-left:0px;padding-top:0px;">
            <div class="uk-grid">
                <div class="uk-width-1-4 justify rightheader" style="padding-left:0px;padding-top:0px;text-align:right">
                    <strong>Section:</strong><br />
                    <strong>Office:</strong><br />
                    <strong>Case:</strong>
                </div>
                <div class="uk-width-3-4 justify rightheader" style="padding-left:15px;padding-top:0px;">
                    <span><strong>Foreign Trade Directorate</strong></span><br />
                    <span><strong>SATES-DCE-UV-2887/2019</strong></span><br />
                    <span>Request for verification of request.</span>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

I already have the my HTML with CSS and it´s showed as intended, logo to the left, and text separated in two minnor divs to the right, but when the PDF is generated, it separate my divs in diferent rows.

来源:https://stackoverflow.com/questions/57862337/rotativa-generated-pdf-not-respecting-uikit-grid

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