Initial commit of the new_printing branch
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
{% load project_tags %}
|
||||
{% load printing_tags %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{% project_name %}</title>
|
||||
|
||||
<style type="text/css">
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
.container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
* html .container {
|
||||
height: 100%;
|
||||
}
|
||||
.centered {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.break { page-break-before: always; }
|
||||
@page {
|
||||
margin: 0cm;
|
||||
}
|
||||
{media print{@page {size: landscape}}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@PAGE landscape {size: landscape;}
|
||||
TABLE {PAGE: landscape;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% get_document_size object %}
|
||||
{{ document_width }} {{ document_height }}
|
||||
<img class="centered" src="{% url document_display_print object.id %}" {% if document_width > document_height %}width="100%"{% else %}height="100%"{% endif %} />
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user