Added document printing support

This commit is contained in:
Roberto Rosario
2011-05-06 00:46:33 -04:00
parent 0eca667fd4
commit c44a1f947c
14 changed files with 215 additions and 92 deletions
+3 -3
View File
@@ -38,16 +38,16 @@
.break { page-break-after: always; }
img { border: 1px solid black; }
@page {
size: {{ page_size.0 }} {{ page_size.1 }};
size: {{ page_width }} {{ page_height }};
margin-top: 1cm;
margin-bottom: 1cm;
margin-left: auto;
margin-right: auto;
}
</style>
</style>
</head>
<body>
{% for page in object.documentpage_set.all %}
{% for page in pages %}
{% get_document_size object %}
<div class="{% if forloop.counter > 1 %}break{% endif %}">
<img src="{% url document_display_print object.id %}?page={{ page.page_number }}" {% if document_aspect > page_aspect %}width="97%"{% else %}height="97%"{% endif %} />