Plugin Contributor
Ewout
(@pomegranate)
@silvercell you mention you didn’t touch the simple template, but it does look like the column widths of the quantity and total column have been adjusted. Can you double check this? If it’s really the simple template, is it possible that you are using a code snippet to alter CSS for the column widths? Are you using the latest version of the plugin (2.8.2)?
Thread Starter
Daniel
(@silvercell)
@pomegranate thanks for the quick reply, I just downloaded the plugin and copied the simple template to the folder in ftp again, same problem :/
I use the latest version yes and for css, wouldn’t this make the html5 output also overlapping like in the pdf? as I said, this is not the case.
Plugin Contributor
Ewout
(@pomegranate)
When you say “html5 output”, are you referring to the “Use alternative HTML5 parser to parse HTML” option, or the “Output to HTML” option? They are two different options.
For HTML output, CSS may respond differently in PDF compared to HTML, so you can’t compare them. If it’s the alternative HTML5 parser, that would suggest there’s some sort of error in the output that needs fixing.
just downloaded the plugin and copied the simple template to the folder in ftp again, same problem :/
If you have applied custom CSS for the column widths via an action hook (in functions.php for example), that would still apply if you do a clean install.
Thread Starter
Daniel
(@silvercell)
Yes, I ment that I chose the output as html option in the status, to test if the problem is also there.
I will look over my css again, maybe I can find something there. thanks
Thread Starter
Daniel
(@silvercell)
OH, as it appears it just happened after I updated the plugin. All invoices before were fine.
Plugin Contributor
Ewout
(@pomegranate)
That’s certainly possible, an update for PHP8.0 compatibility of the PDF rendering engine we use (dompdf) has a somewhat different approach to the table rendering that required changes in the ‘official’ CSS of the Simple template too.
If you want to quickly find out if you have applied custom CSS, you could use HTML output, then do right click > inspect on the Quantity column, it should have a width of 20%.
The totals table width is determined by the width of the 2 last columns, so if yours is smaller than this will also shrink the totals table.
Thread Starter
Daniel
(@silvercell)
I did downgrade again and it seemed to work, but my client got a wp issue emailed: https://ibb.co/HKnh0Bg
So now I try to make it work with the newest version, but I checked the width and it is 20%: https://ibb.co/h8TKVXF
Also if i shrink it everything looks fine in html mode: https://ibb.co/0FKKf8B
Another weird effect is that the table is only on the second page?!: https://ibb.co/n7ch5Nz
Any idea what could be wrong here?
thanks again
Hi @silvercell,
Regarding the table, it is very possible that you may need to adjust/remove your table margins:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
function wpo_wcpdf_custom_styles () {
?>
table.order-details {
margin-bottom: 0mm;
}
<?php
}
For more information on why this might be happening please take a glance at this thread:
https://ww.wp.xz.cn/support/topic/in-bulk-document-invoice-breaking-to-the-next-page/
Hopefully this makes sense!