相关疑难解决方法(0)

TCPDF不呈现所有CSS属性

我尝试编写一个PDF编写CSS和HTML,但我的CSS没有出现在我的PDF中.唯一考虑的是font-size和font-color.

我给你代码(抱歉,它有点长......)

$config = sfTCPDFPluginConfigHandler::loadConfig('my_config');

    $doc_title    = "Fiche Logement";

    $html = <<<EOF
<style>
        .informations {
            padding: 10px;
            margin: 10px;
            border: 1px dotted black;}
        .informations table {
            margin-top: 10px;}
        #modif {
            margin: 20px;
            text-align: left;
            float: right;}
        #modif th {
            padding-left: 10px;}
        #modif td {
            padding-left: 10px;}
        #adresse {
            width: 307px;
            float: left;}
        #reservataire {
            width: 307px;
            float: right;}
        #intergen {
            width: 307px;
            float: right;}
        #infos {
            width: 290px;
            float: left;}
        #handicap {
            padding-bottom: 12px;
            width: 324px;
            float: right;}
        #charges { …
Run Code Online (Sandbox Code Playgroud)

css tcpdf

38
推荐指数
6
解决办法
11万
查看次数

Put elements from left and right side to the same line

I'm using html2pdf with my Django project in order to create some PDF files and I get an HTML problem.

我想将两个元素放在同一条线上,但第一个元素位于右侧,另一个位于左侧。

我的脚本看起来像:

<html>
    <head>
    {% load staticfiles %}

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   
    <link rel="stylesheet" type="text/css" href="{% static 'css/BC_base.css' %}"/>

    <style>

        body {
                font-family: Courier New, Courier, monospace;
                /*text-align: justify;*/
                list-style-type: none;
            }

        .alignleft {
                float: left;
                border-right : 100px;
            }
        .alignright {
                float: right;
                border-left: 100px;
            }

        .title {
                border-top: 150px;
                font-size: 7;
        }

        {% block style %}
                @page …
Run Code Online (Sandbox Code Playgroud)

html css django

0
推荐指数
1
解决办法
2535
查看次数

标签 统计

css ×2

django ×1

html ×1

tcpdf ×1