pisa pdf generation- texto solo para la primera página

I want to create letters with pisa (& django python). I need the company address to appear on the first page but not subsequent pages. I can't work out how to do it and it's driving me nuts (there's not a lot of documentation out there on Pisa.

Also I'd love to be able to use frames without making the content static (as with the -pdf-frame-content css attribute).

At the moment I've got logo's appearing top and bottom and my text appearing OK, I'm just struggling to really control where it appears.

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

preguntado el 09 de marzo de 12 a las 15:03

Not sure i understand what the problem is - are you meaning you want to the company address to appear then page break? if so add <div><pdf:nextpage /></div> after the div -

No, I want the company address to appear on the top right of the first page. but not on the second / third page. on the second / third page, I want that space to be empty. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.