Hi good morning
I've tried what you suggest above.
The contents of the pdf are:
<html><style>.term {
margin-right:5px;
margin-top:10px;
margin-bottom:5px;
padding:5px 20px 5px 20px;
border:1px solid gray;
display:table;
background:rgb(70,70,70);
color:rgb(248,248,248);
}
.debugtitle {
font-weight: bold;
text-decoration:underline;
padding-bottom: 10px;
}
.errorLabel {
color: black;
font-size: 1.1em;
background-color: white;
border: 1px solid red;
display: table;
margin: 15px auto;
padding: 10px;
text-align: left;
border-radius: 3px;
}
.note {
padding:10px;
border:1px solid gray;
background-color: #EFEFEF;
}
</style><body><div class="debugtitle">wkhtmltopdf debug</div><div class="note">To test wkhtmltopdf pdf generation, copy the following command into the server's command line.
myDBR saved the generated HTML file into C:\Windows\Temp\mydbr_export_1419447125.html. File size is: 8231 bytes.<div class="term">$ "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" -q -O Portrait -s A4 --margin-top "20" --header-spacing "8" --header-html "http://xxx.xxx.com/mydbr/user/export_header_pdf.php" --replace rdate "14/04/2016" --replace rtime "01:22:17 PM" --header-html '' C:\Windows\Temp\mydbr_export_1419447125.html -</div></div></body></html>
The generated HTML file opens fine and is what was expected except for the missing logo.
<!DOCTYPE html>
<html class=" pdf">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="description" content="Web reporting made easy with myDBR. myDBR is an advanced web reporting tool for MySQL, MS SQL Server and Sybase databases">
<meta name="version" content="4.6.2/2973">
<link rel="shortcut icon" href="http://xxx.xxx.com/mydbr/images/mydbr_fav.ico?v=2973" type="image/ico">
<title>Print Invoice - Hilmark MIS</title>
<script type="text/javascript">mydbr_sorting = {
separator: {thousand:",", decimal: "."},
dateformat: "d\/m\/Y h:i:s A",
sum_prefix: "",
min_prefix: "min",
max_prefix: "max",
count_prefix: "#",
avg_prefix: "avg"
}</script>
<script type="text/javascript">jquery_date = "dd/mm/yy";jquery_time = "hh:mm:ss TT";</script>
<link href="http://xxx.xxx.com/mydbr/lib/external/jquery/css/assets.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/lib/external/jquery/css/jquery-ui/jquery-ui.min.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/lib/external/jquery/js/select2/select2.min.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/interface/style.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/interface/normal.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/interface/themes/gray.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/interface/wkhtmltopdf.css?v=2973" rel="stylesheet" type="text/css">
<link href="http://xxx.xxx.com/mydbr/user/userstyle.css?1460629336&v=2973" rel="stylesheet" type="text/css">
<!--[if gt IE 8]>
<link href="http://xxx.xxx.com/mydbr/interface/ie8ormore.css?v=2973" rel="stylesheet" type="text/css">
<![endif]-->
<script type="text/javascript" src="http://xxx.xxx.com/mydbr/lib/external/js/modernizr.js?v=2973"></script>
<script type="text/javascript" src="http://xxx.xxx.com/mydbr/lib/external/jquery/js/assets.js?v=2973"></script>
<script type="text/javascript" src="http://xxx.xxx.com/mydbr/lib/javascript/assets.js?v=2973"></script>
</head>
<body>
<form class="param_input param_input_pad invisible lightgray in_report_param" method="get" action="report.php"><div><input type="hidden" name="r" value="294"></div><div style="text-align: center;"><table class="center report_params report_params_294"><thead><tr class="title"><th colspan="2" class="paramTitle"></th></tr><tr class="row_header report_params_header_row"><th class="cell_header cell_header align_l">Parameter</th><th class="cell_header cell_header align_l">User input</th></tr><tr><th></th><th></th></tr></thead><tbody><tr class="param_row"><td class="input_label" style="">inPlt_ID:</td><td class="input_cell"><input style="width:25em;" class="" id="_u1" name="u1" value="BOWMEWS_05" type="text"></td></tr><tr><td colspan="2"></td></tr><tr><td class="input_label" colspan="2" style="width:200px; text-align: center;"><input type="submit" class="runreport button sub_button" value="Run report"><input type="hidden" name="m" value="7"><input type="hidden" name="h" value="c46701e7ab2da6c009322aea15a33a4c95ca9996"><input type="hidden" name="export" value="pdf"></td></tr></tbody></table></div><hr class="param"><script type="text/javascript"></script></form><div class="content report_294">
<table class="mydbr_popupframe"><tr><th class="border"><span></span></th></tr><tr><td><div class="popup_content" id="popup"></div></td></tr></table><input type="hidden" name="m" value="7">
<input type="hidden" id="db" name="db" value="mysql">
<style type="text/css">body {background:white;}</style><style type="text/css">.invheader {width:80%;}</style><style type="text/css">.invcon {width:760px;}</style><style type="text/css">.invheader {width:80%;}</style><div class="template"><style type="text/css">
.invcon {
box-sizing: border-box;
padding-right:15px;
padding-left:15px;
margin-right:auto;
margin-left:auto;
width:90%;;
margin-top:15px;
background-color:white;
overflow:hidden;
}
.invheader {
min-height:100px;
overflow:hidden;
background:#e5;
margin:0 auto;
width:80%;
}
.invimage {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
padding:5px;
margin: 10px 0 0 0;
float: left;
background-color: white;
border:1px solid #;
width:20%;
display: inline;
text-align:left;
}
.invdate {
float:right;
width:75%;
padding:5px;
margin-top:20px;
font-weight:bold;
text-align:right;
font-size:1rem;
}
.compadd {
width:100%;
float:left;
text-align:left;
margin:-5px 0 10px 2px;
font-weight:bold;
}
.site {
min-width:1px;
clear:both;
font-weight:bold;
font-size:1.5rem;
padding:20px;
border:solid 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin:0 auto;
margin-top:20px;
}
</style><div class="invcon">
<div class="invheader">
<div class="invimage"> </div>
<div class="invdate">
<p>Date: 14/04/2016</p>
</div>
<div class="compadd">19 XXX Road, XXX</div>
<div class="site">5 xxx xxx, xxx. xxx xxx </div>
</div>
</div></div><div class="template"><style>
.inv_rows { border: 1px solid #555; border-collapse: collapse; width:100%; padding:5px;font-size:1rem; font-weight:bold;}
.inv_rows th { background-color: #E0E0E0; border-bottom: 1px solid #555 }
.inv_rows th, .inv_rows td { padding: 5px }
.inv_rows th.right, .inv_rows td.right { text-align: right }
.inv_rows th.left, .inv_rows td.left { text-align: left }
</style>
<div class="invcon">
<div class="invheader">
<table class="inv_rows">
<thead>
<tr>
<th class="left" style="width: 20%">Order Date</th>
<th class="left" style="width: 40%">Description</th>
<th class="right" style="width: 20%">Qty</th>
<th class="right" style="width: 20%">Total</th>
</tr>
<thead>
<tr class="#alternate_row_color">
<td class="left">08/04/2016</td>
<td class="left">Sunroom</td>
<td class="right">1</td>
<td class="right">10,000</td>
</tr>
<tr class="#alternate_row_color">
<td class="left">09/04/2016</td>
<td class="left">Westcott 5 Stove</td>
<td class="right">1</td>
<td class="right">0</td>
</tr></table>
</div>
</div></div><div class="template"><div class="invcon">
<div class="invheader">
<table class="inv_rows" style=" border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;">
<tr>
<td style="width: 20%"></td>
<td style="width: 40%"></td>
<td class="right" style="width: 20%">Total</td>
<td class="right" style="width: 20%">10,000</td>
</tr>
<tr>
<td style="width: 20%"></td>
<td class="right" style="width: 40%"> </td>
<td class="right" style="width: 20%"> </td>
<td class="right" style="width: 20%"></td>
</tr>
</table>
</div>
</div></div></div>
<script type="text/javascript">mydbr_loc = new Array();mydbr_loc["MYDBR_AA_OK"] = 'OK';mydbr_loc["MYDBR_AA_CANCEL"] = 'Cancel';mydbr_loc["MYDBR_AA_COPY_TO_CLIPBOARD_OK"] = 'myDBR\nThe data has been copied to your clipboard.';mydbr_loc["MYDBR_IMPORT_FILE"] = 'File';mydbr_loc["MYDBR_IMPORT_IMPORT"] = 'Import';mydbr_loc["MYDBR_IMPORT_SELECT"] = 'Please select the file to be imported';mydbr_loc["MYDBR_AA_MULTILEVEL_SORT"] = 'Click here to sort.\nPress shift for a multilevel sort.';mydbr_loc["MYDBR_AA_ALL"] = 'All';</script><script type="text/javascript">jquery_date = 'dd/mm/yy'</script></body></html>
Running from command line :
C:\>"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" -q -O Portrait -s A4 --ma
rgin-top "20" --header-spacing "8" --header-html "http://xxx.xxx.com/m
ydbr/user/export_header_pdf.php" --replace rdate "14/04/2016" --replace rtime "0
1:22:17 PM" --header-html '' C:\Windows\Temp\mydbr_export_1419447125.html output
.pdf
QFont::setPixelSize: Pixel size <= 0 (0)
QWin32PrintEngine::initialize: OpenPrinter failed (No printers were found.)
QWin32PrintEngine::initialize: OpenPrinter failed (No printers were found.)
Error: Failed loading page http:?page=1§ion=&sitepage=1&title=Print Invoice
- Hilmark MIS&subsection=&frompage=1&subsubsection=&rtime=01:22:17 PM&rdate=14/0
4/2016&topage=1&doctitle=Print Invoice - Hilmark MIS&sitepages=1&webpage=C:\Wind
ows\Temp\mydbr_export_1419447125.html&time=11:39:30&date=14/04/2016 (sometimes i
t will work just to ignore this error with --load-error-handling ignore)
QPaintDevice: Cannot destroy paint device that is being painted
Cheers and thanks again
Jake