2

pisa(& django python)で文字を作りたいです。会社の住所を最初のページに表示する必要がありますが、後続のページには表示しません。私はそれを行う方法を理解できず、気が狂いそうになっています (Pisa に関するドキュメントはあまりありません。

また、コンテンツを静的にすることなくフレームを使用できるようにしたいと思います (-pdf-frame-content css 属性のように)。

現時点では、ロゴが上下に表示され、テキストが正常に表示されていますが、表示される場所を実際に制御するのに苦労しています.

<!DOCTYPE HTML>
<html>
    <head>
       <title>Patient Acceptance</title>
       <style type="text/css">
           @page {
               size:  {{ pagesize }};
               margin-top: 3.5cm;
               margin-left: 2.5cm;
               margin-bottom: 4cm;
               margin-right: 2cm;
               @frame footer {
                   -pdf-frame-content: pdf_footer_content;
                   bottom: 0cm;
                   margin-left: 2cm;
                   margin-right: 0.5cm;
                   height: 3cm;
               }
               @frame blar_logo {
                   -pdf-frame-content: pdf_blar_logo;
                   top: 0.5cm;
                   margin-left: 2cm;
                   margin-right: 15cm;
                   height:3cm;
               }
           }
           .blar_address {
                   top: 0cm;
                   margin-left: 13cm;
                   margin-right: 0cm;
                   height:4cm;
               }
           .institution_address {
                   top: 0.9cm;
                   margin-left: 0cm;
                   width: 10cm;
                   height:4cm;
               }
       </style>
    </head>
    <body>
       <div id = "pdf_logo">
           <img alt="study logo" src="/media/images/logo_for_letters2.jpg"/>
       </div>
       <div class="blar_address">
           Central Monitoring Office</br>
           Castle Hospital</br>
           Castle Road</br>
           Brendam</br>
           East Binkleshire, BK2 3LK</br>
       </div>
       <div class="institution_address">
        {{ gp.gp_title }} {{ gp.gp_firstname }} {{ gp.gp_surname }}</br>
        {{ gp.practice_id.practice_name }} </br>
        {{ gp.practice_id.address_1 }} </br>
        {% if gp.practice_id.address_2 %}
            {{ gp.practice_id.address_2 }} </br>
        {% endif %}
        {% if gp.practice_id.address_3 %}
            {{ gp.practice_id.address_3 }} </br>
        {% endif %}
        {% if gp.practice_id.address_4 %}
            {{ gp.practice_id.address_4 }} </br>
        {% endif %}
        {% if gp.practice_id.town_city %}
            {{ gp.practice_id.town_city }} </br>
        {% endif %}
        {% if gp.practice_id.post_code %}
            {{ gp.practice_id.post_code }} </br>
        {% endif %}
       </div>
       <p> {{ date }} </p>
       <p>Please file this letter and a copy of the patient&#39s informed consent in the patient&#39s case records</p>
       <p>Dear {{ gp.gp_title }} {{ gp.gp_surname }},</p>
       <p>I am writing to inform you that your patient {{ patient.patient_title }} {{ patient.patient_firstname }} {{ patient.patient_surname }}, {{ patient.address_1}}
        {% if patient.address_2 %}
            , {{ patient.address_2 }}
        {% endif %}
        {% if patient.address_3 %}
            , {{ patient.address_3 }}
        {% endif %}
        {% if patient.address_4 %}
            , {{ patient.address_4 }}
        {% endif %}
        {% if patient.town_city %}
            , {{ patient.town_city }}
        {% endif %}
        {% if patient.post_code %}
            , {{ patient.postcode }}
        {% endif %}
       , has volunteered to participate in a clinical trial entitled Blar</p>
       <p>This patient has been assigned to   
       {% if patient.cora = 'C' %}
            blar
       {% else %}
            blar
       {% endif %}                         
       <p>This is a randomised controlled trial funded by the NHS comparing blar and blar
       <p>Should you have any questions or concerns, please contact the central monitoring office on 01815 654864.</p>
       <p>Yours sincerely,</p>
       </br>
       </br>
       <p>Professor Blar</p>
       <div>
       </div>

       <div id="pdf_footer_content">
           <img alt="Bniklle NHS Logo" src="/media/images/blar_nhs_logo_for_letters2.jpg"/>
           <img alt="University of Bunkum Logo" src="/media/images/uni_blar_logo_for_letters2.jpg"/>
       </div>
    </body>
</html>
4

0 に答える 0