-
Notifications
You must be signed in to change notification settings - Fork 1.8k
v0.12.2.1 and 0.12.1 - Page headers given in --header-html only shown in the first page of PDF file #2284
Comments
With
how do you expect an issue to be investigated? Please reopen the issue if you can provide a complete, self-contained HTML/CSS with complete command-line and environment details (OS, Language, 32/64-bit, etc). |
Hi @ashkulz :
where header contains what I pasted in the description of the issue plus some css and js.
I am running Ubuntu 14.04 64 bits:
|
Pasting the complete header in case it helps: <html>
<head>
<meta name="description" content="Header" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#header{
font-family: Arial, Helvetica, sans-serif;
}
#header td {
background-color: #FFFFFF;
}
#header #header-table {
width: 100%;
}
#header #name {
font-style: italic;
font-weight: bold;
}
#header #contact {
font-size: 13px;
line-height: 130%;
}
#header #title {
font-size: 21px;
font-weight:bold;
margin-right: -1%;
}
#header #date {
font-size: 18px;
}
#header #time {
font-size: 18px;
}
#header #description {
font-size: 13px;
font-style: italic;
line-height: 130%;
text-align: right;
}
#header .td-contact {
width: 43%;
padding-left: 1%;
padding-right: 1%;
vertical-align: top;
}
#header .td-image {
width: 14%;
min-height: 45px;
min-width: 100px;
padding-left: 0.5%;
padding-right: 0.5%;
vertical-align: top;
}
#header .td-date {
width: 43%;
padding-right: 1%;
padding-left: 1%;
text-align: right;
vertical-align: top;
}
#img-logo {
max-height: 45px;
max-width: 100px;
margin: 10% auto 50% auto;
}
#title-date {
font-size: 13px;
padding-left:1%;
}
#span-date-time {
font-size: 18px;
}
br {
display: block;
margin: 0 0;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://momentjs.com/downloads/moment.min.js"></script>
<script type="text/javascript">
// (removed the js used to fill in the date, contact info and so on)
</script>
</head>
<body onload='doDate(); doHeader(); doLogo();' style="margin: 0; padding: 0">
<div id="header">
<table id='header-table'>
<tr>
<td class='td-contact'>
<span id='name'></span><br>
<span id='contact'></span>
</td>
<td class='td-image'>
<img
id='img-logo'
src=''
alt="Logo"
/>
</td>
<td class='td-date'>
<span id='title'></span>
<br/>
<span id='title-date'>
Report Date
</span>
<span id='date'></span><br />
<span id='description'></span>
</td>
</tr>
</table>
</div>
</body>
</html> |
@faustow: please understand that I'm helping you out in my spare time. I should not have to hunt/guess for information which should be provided as per the support page.
Without something I can run, I cannot verify. Read up on how to report bugs effectively. |
Hi @ashkulz :
<!DOCTYPE html>
<html>
THIS IS THE HEADER
</html>
<!DOCTYPE html>
<html>
<script src="http://momentjs.com/downloads/moment.min.js"></script>
THIS IS THE HEADER
</html>
<!DOCTYPE html>
<html>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="This is a report." />
<meta name="keywords" content="orientation:Portrait"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.3/moment-with-locales.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://raw.github.com/twigkit/tempo/master/tempo.min.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
$(window).bind("load", function() {
var theBigTree = JSON.parse('[{"id":"c-03104678-AE5C-4538-B297-259A40FF9A80","name":"CLIENT A","teams":[{"id":"f-25E9E53C-7C4F-42CF-A2A8-81EF3F82940E","name":"123","players":[{"id":"a-BE9D684F-B9C4-43C4-A989-BE9E08173535","name":"0001609","description":"DNS 87 x 10","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]},{"id":"c-62806657-A23D-4A4F-AD06-70A2C84F1757","name":"CLIENT B","teams":[{"id":"f-A84882B8-24E4-44E6-BDEA-D49190753D39","name":"ABC","players":[{"id":"a-A31F5485-75EC-4C2F-88C8-3D9D315EC354","name":"0001584","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-F90AB955-F106-42D0-9DD5-114B7FCAC8EF","name":"0001585","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-732ED35A-3C2C-4A22-9D47-D43D189CEBB8","name":"0001586","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-BBBA13B2-3709-4995-8298-7A91412D29BB","name":"0001587","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-1942CCC6-895C-43CA-BE1C-D7BEE193E008","name":"0001588","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-D33317CC-EC63-497F-BAF4-E5881154BE02","name":"0001590","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-116BAC43-F703-467F-B6A9-EFE8667B11EB","name":"0001593","description":"Fair 141-14 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]},{"id":"c-BC48BE3B-A9D8-48FA-9047-B6B486716DD2","name":"CLIENT C","teams":[{"id":"f-E32A6204-86AD-47F6-BCB9-16BE663203FB","name":"CDE","players":[{"id":"a-A8FE73C2-1FA1-4A7F-9C3F-110454C71085","name":"0001614","description":"Good 18 x 20 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-06255DF8-015E-42DA-B73B-DBCE3A5D7129","name":"0001615","description":"Good 12 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-72B822C8-8391-4ED3-8884-3934BAF49CFA","name":"0001618","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-579BDBA0-2AE3-44BD-8C8A-D47525D70185","name":"0001619","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-2D601DCC-3F0E-41E7-A7F0-FF1B2D5FA1FD","name":"0001620","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-DF9EEF83-E8C9-4475-A7F6-E42F9E89795F","name":"0001621","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-B311B0B2-4CE6-4220-9B76-861FDC7476C0","name":"0001622","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-B0B75CC4-C28B-4673-A408-9E33F5842C24","name":"0001623","description":"Good 8 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-7ED1D4E6-E40D-4307-9FC3-C0DB8CD1D7AB","name":"0001625","description":"Good 18 x 20 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]},{"id":"c-996AB994-DBFC-4388-B66A-A7957497E6E2","name":"CLIENT D","teams":[{"id":"f-436F5CFF-DCE3-41A4-9EAF-9518F752EDE8","name":"FGH","players":[{"id":"a-6ABF8430-8BAD-48A9-BFAD-85448F83A9E7","name":"0001722","description":"Good 9 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-FBF266AD-EB7D-447B-8B9F-658694C0E523","name":"0001723","description":"Good 9 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-F815569F-002D-4E48-88FA-D1B51F0A4B71","name":"0001726","description":"Good 9 x 10 HND","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-60360436-6FA0-42E9-A7F3-A2E7DD54FBA5","name":"0001729","description":"Good 12 x 10 CHN","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-FB3E9A6C-DD05-4ADF-8791-291EE655368C","name":"0001730","description":"Good 12 x 10 CHN","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-EAABD599-43F8-42B0-AE6E-C7D14462BD12","name":"0001731","description":"Good 12 x 10 CHN","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-EFEAA4FD-C244-41C5-931A-116C8E82ACE6","name":"0001732","description":"Good 10 x 10 CHN","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]},{"id":"c-2AC042D3-3A2F-4D9C-B7A9-8B22827BDB75","name":"CLIENT E","teams":[{"id":"f-FC526C0C-DD3A-4CBC-976D-1A7CA6313A07","name":"HIJ","players":[{"id":"a-2CE7D70A-C444-4CB4-ADB2-1E92E45F309B","name":"0001708","description":"Good 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-0E2630DC-1A01-4077-92D4-37096E13F213","name":"0001709","description":"Good 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-4C4959B5-0E3D-454B-A088-158AE2275F33","name":"0001710","description":"Good 14 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-E69B2CFE-3FBD-4DE9-8E66-6DBD0CE8A468","name":"0001711","description":"Good 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-B150AF87-69E4-4BD6-8EB7-823BA1E09C37","name":"0001712","description":"Good 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-4A2362B4-3B9C-48C1-947E-CB99E73BFF39","name":"0001713","description":"Good 14 x 12 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-30191791-A320-45D2-A802-032FC60AE600","name":"0001714","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-C90A6B10-B319-4BFD-87C6-C7C25A931648","name":"0001715","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-392AC236-7E64-4CB4-9A07-3070B5E0E62D","name":"0001716","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-A5D79F6F-CA5D-4625-90F1-789825A49F96","name":"0001717","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-6BA176D0-BF5E-4745-AA0B-52E9DF914AD2","name":"0001718","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-73270EA5-F425-4B0E-A25E-A042AA5FB248","name":"0001719","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-89706A6B-A8FF-4F18-B1A7-9EF7770F4FE3","name":"0001720","description":"NON 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-0152535A-73F6-46F9-9337-141D2EC8CA1D","name":"0001721","description":"Good 12 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]},{"id":"c-F6178B77-45FA-4E07-B1F1-A0AAB0F97B22","name":"CLIENT F","teams":[{"id":"f-0D9A8DFF-BBA8-4F3D-8637-B43A83E178D0","name":"KLM","players":[{"id":"a-655D3D0C-F630-4C83-8EC8-81980A72AFDA","name":"0001254","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-7EC2CFA7-E068-4730-974D-D3666F616313","name":"0001255","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-86AC0836-3311-4568-877B-336ABD47D031","name":"0001539","description":"Good 10 x 10 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-811C9E7B-60ED-43FC-B237-FC93BD1C959F","name":"0001540","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-63370E1F-A4F5-4D6D-8B2F-2D89B4E601DD","name":"0001541","description":"Good 104 x 12 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-F88F3ED5-9138-4B29-B8EF-EF5708522E7D","name":"0001626","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-99B87F8C-F3F7-43EB-A418-5313C94AAED9","name":"0001627","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-93C7710A-E036-4AF9-B741-54A4F191B5D5","name":"0001628","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-7C67BAB8-CC35-49C2-AE6D-8D5DE721F976","name":"0001629","description":"Good 16 x 14 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-5CC975CC-0BC4-4C00-8884-226A9CDF153E","name":"0001630","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-73CAF410-B0C5-42F9-A66B-92956096AB50","name":"0001631","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-758F2352-02C6-4210-9D9B-40A4F757BC14","name":"0001632","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-765A4544-ADE9-44DD-BD5B-C35540E0EB1A","name":"0001633","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Unknown Compliance"}]}]},{"id":"c-DEC92495-59C0-4193-845E-8562BB3C901C","name":"CLIENT G","teams":[{"id":"f-E4333E5E-7DCC-4F1D-804B-E3D0A2B21AD4","name":"NOP","players":[{"id":"a-0ECF79EF-3048-49C5-8044-3059F6C32F3D","name":"0001308","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-19C83D60-1BF9-4454-B5E3-C34A9F284767","name":"0001309","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-C33A6D2C-BA52-4BF5-9DC6-BC1FF996A1D8","name":"0001310","description":"Good 18 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-3E2319CA-A418-46FB-96E0-B08637471C8C","name":"0001311","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-526E2C41-9D49-4C77-9A15-F2008D2AF6B3","name":"0001312","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-057D1B1B-D0FF-4B86-82D3-EDF703B8C387","name":"0001313","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"},{"id":"a-4FD29E74-CC55-4B2A-BA24-7BF81BBEAC86","name":"0001314","description":"Good 16 x 16 EO","compliance_schedule":"current","compliance_inspection":"Not Compliant"}]}]}]');
Tempo.prepare('customer-non-compliant-player-list').render(theBigTree);
});
</script>
<style type="text/css">
#customer-non-compliant-player-list th {
border-top: solid 1px #7E7E7E;
border-bottom: solid 1px #7E7E7E;
border-left: solid 1px #7E7E7E;
border-right: solid 1px #7E7E7E;
text-align: center;
padding: 1%;
background-color: #D9D9D9;
}
#customer-non-compliant-player-list td {
border-top: solid 1px #7E7E7E;
border-bottom: solid 1px #7E7E7E;
border-left: solid 1px #7E7E7E;
border-right: solid 1px #7E7E7E;
padding: 0.5%;
}
#customer-non-compliant-player-list table {
border-collapse: collapse;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
#customer-non-compliant-player-list .text-large {
font-size: 18px;
}
#customer-non-compliant-player-list .customer-column {
vertical-align:top;
font-weight: bold;
width: 10px;
}
#customer-non-compliant-player-list .team-column {
vertical-align:top;
width: 17%;
}
#customer-non-compliant-player-list .team-column-header {
width: 14%;
}
#customer-non-compliant-player-list .id-column {
width: 11%;
}
#customer-non-compliant-player-list .description-column {
width: 20%;
}
#customer-non-compliant-player-list .inspection-column {
width: 17%;
text-transform: capitalize;
}
#customer-non-compliant-player-list .schedule-column {
width: 19%;
text-transform: capitalize;
}
#customer-non-compliant-player-list .border-bottom-only {
border-top: none;
border-right: none;
border-left: none;
}
#customer-non-compliant-player-list .no-border {
border-top: none;
border-bottom: none;
border-right: none;
border-left: none;
}
#customer-non-compliant-player-list #players-table tr:last-child td {
border-bottom:0;
}
#customer-non-compliant-player-list #players-table {
padding: -2px;
border-collapse: collapse;
}
.no-border {
border: none;
}
.width-50pc {
width: 50%;
}
#customer-non-compliant-player-list table {
width: 100%;
margin: auto;
}
</style>
</head>
<body>
<title>This is the title</title>
<p></p>
<div id="customer-non-compliant-player-list">
<table>
<th>THIS IS THE TITLE</th>
</table>
<br>
<table id="customers">
<tr data-before-template='data-before-template'>
<th class="customer-column">CUSTOMER</th>
<th class="team-column-header">TEAM</th>
<th class="id-column">PLAYER</th>
<th class="description-column">DESCRIPTION</th>
<th class="inspection-column">INSPECTION</th>
<th class="schedule-column">SCHEDULE</th>
</tr>
<tr data-template='data-template'>
<td class="customer-column">{{name}}</td>
<td colspan="5">
<table class="no-border">
<tr data-template-for='teams'>
<td class="team-column no-border">{{name}}</td>
<td class="no-border">
<table class='player-table no-border' >
<tr data-template-for="players" >
<td class="id-column no-border">{{name}}</td>
<td class="description-column no-border">{{description}}</td>
<td class="inspection-column no-border">{{compliance_inspection}}</td>
<td class="schedule-column no-border">{{compliance_schedule}}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div></body>
</html> You'll notice I pasted two different header files. In the case of header1.html, the header text "THIS IS THE HEADER" is displayed correctly in both the 1st page and the second one. However, as soon as I import moment js from http://momentjs.com/downloads/moment.min.js like header2.html has, the text "THIS IS THE HEADER" is only displayed on the first page. The second page shows a blank space with no text. |
I found out this: Here is a minimal example: header-html<!DOCTYPE html>
<html>
<body style="margin:0;border: 1px solid red;">
HEADER-LOCATION<br>
<script src="Test.js"></script><br>
<!-- <script>document.write(document.location)</script><br> -->
/HEADER-LOCATION
</body>
</html> Test.jsdocument.write(document.location); Document.htm<!DOCTYPE html>
<html>
<body>
THE DOCUMENT.
</body>
</html> Command Line
Remarks
|
(This issue was first introduced in #2098.)
Using the --header-html parameter will only make the headers show in the first page of the pdf. This didn't happen in v0.12.1.
The HTML used is
The {{...}}-labels are for tempojs.
The HTML used for the header (minus the js and css) is:
The text was updated successfully, but these errors were encountered: