when I get html of a sale receipt the items would be generated into a <table>.
The table, as some have said to be the issue by others, was not for me. I
noticed that I had cells that were empty so i attempted to use
.replace('><','><input hidden/><');
I essentially added a hidden input where ever there was a empty cell... and
also possibly at any touching tags. Either way they are invisible and will not
effect the layout.
my snippet in jquery before passing the variable in ajax to dompdf php script.
var prnt_width = $('#def_prnt_width').val();
----> var prnt_body = $('#receipt_content').html().replace('><','><input hidden/><');
var prnt_height = $('#receipt_content').height();
var prnt_sale_id = $('#sale_id').text();
$.ajax({url:"pdfgen.php", type: "POST", data: {"prnt_body": prnt_body, "prnt_width": prnt_width, "prnt_height": prnt_height, "prnt_sale_id": prnt_sale_id}, success:function(result){
$('#prnt_resp').html(result);console.log(result);
}});
Original issue reported on code.google.com by moe....@gmail.com on 26 Oct 2014 at 8:43
Original issue reported on code.google.com by
moe....@gmail.com
on 26 Oct 2014 at 8:43