Line space doubled
-
Hi
I had the plugin for some time and have always been able to customize my invoice – now it makes double linespace after last update.
Do I make some mistake I can’t see/find?
Thanks in advance
Mick
-
Hello @haarbollen,
There was a recent update to DOMPDF – v2.0.7 – the engine we use to convert HTML to PDF.
Are you only getting your issue in a particular area of the document?
Would you kindly show us the PDF output?
See Uploading Images to WordPressHi @dpeyou
Yes I am. I can’t share the output I’m afraid. Do you have en email address to which I can send it, I’m anxious to hear if there’s an issue I have to take care of?
@haarbollen,
You have to find a way to make it easier for us to help you here. ??
How good is your ability with CSS?
I suggest creating a dummy order with fake data.
Email support is for paying customers ([email protected] only, paid software support banned here).Hi Darren
This is how it looks – before updating, names and the like, were on one line and the distance was ordinary letter distanceI have made them as regular PDF and uploaded here:
Before updating:
https://kjellerup.biz/pre-update-invoice.pdf and after updating:
https://kjellerup.biz/past-update-invoice.pdf
best regards and thanks!
MickHi @haarbollen,
Could you please share the code of your custom template, so we can test it in our side to run some tests? If so, please use https://pastebin.com/ to do it, and set the pate expiration to 1 week, just in case.
Thanks, done!!
(Title: Woocommerce PDF invoices and packing slips – Line space doubled)@haarbollen the link to pastebin was not added. Can you paste the link directly here, please?
Ah, damn – I added a new one:
https://pastebin.com/scmAqdAr
sorry! :o)Thanks for the code. It’s possible the issue with additional css rules being applied to your
span
ortd
tags. You can view your template in HTML mode to get a better understanding of the css rules that are being applied. You can then adjust those rules to your liking.Hi
I have inspected it in the file I sent you. There is something that “puts a break into my html” and I don’t know where it is generated. The lineheight I can adjust but the extra break that is generated somewhere, I don’t know where to find.
Is it possible that it is transferred from woocommerce files?
Thanks anywayHi @haarbollen,
Please try replacing the code from your custom table (lines from 32 to 62) with this one:
<table width="100%" class="custom-customer-data"> <tr> <td style="white-space: nowrap !important;"> <div style="color: #5a5d5e !important;">First name:<br><?php $this->custom_field("billing_first_name_two"); ?></div> <div style="color: #5a5d5e !important;">Last name:<br><?php $this->custom_field("billing_last_name_two"); ?></div> <div style="color: #5a5d5e !important;">Company:<br><?php $this->custom_field("billing_company_two"); ?></div> <div style="color: #5a5d5e !important;">CVR/TAX:<br><?php $this->custom_field("billing_cvr"); ?></div> <div style="color: #5a5d5e !important;">EORI<br><?php $this->custom_field("billing_eori"); ?></div> <div style="color: #5a5d5e !important;">Job title:<br><?php $this->custom_field("billing_jobt_title"); ?></div> <div style="color: #5a5d5e !important;">Mobile phone number<br><?php $this->custom_field("billing_mobile_phone"); ?></div> <div style="color: #5a5d5e !important;">Work phone<br><?php $this->custom_field("billing_work_phone"); ?></div> <div style="color: #5a5d5e !important;">Email:<br><?php $this->custom_field("billing_email_2"); ?></div> <div style="color: #5a5d5e !important;">Booking event/-occasion<br><?php $this->custom_field("billing_event"); ?></div> </td> <td style="padding-left: 20px"> <div style="color: #5a5d5e !important;">Contact person, crew<br> <?php $this->custom_field("billing_contact_person_crew"); ?></div> <div style="color: #5a5d5e !important;">Delivery Address<br> <?php $this->custom_field("billing_address_one"); ?></div> <div style="color: #5a5d5e !important;">Delivery Address 2<br> <?php $this->custom_field("billing_address_two"); ?></div> <div style="color: #5a5d5e !important;">Location zip code (Delivery)<br> <?php $this->custom_field("billing_postcode_two"); ?></div> <div style="color: #5a5d5e !important;">Location city (Delivery)<br> <?php $this->custom_field("billing_city_two"); ?></div> <div style="color: #5a5d5e !important;">Location country (Delivery)<br> <?php $this->custom_field("billing_country_two"); ?></div> <div style="color: #5a5d5e !important;">Location phone number<br> <?php $this->custom_field("billing_location_phone"); ?></div> <div style="color: #5a5d5e !important;">Location contact person<br> <?php $this->custom_field("billing_contact_person"); ?></div> </td> </tr> </table>
Also, add this CSS rule to add a margin between each field:
table.custom-customer-data div { margin-bottom: 1em; }
Hope it helps!
- The topic ‘Line space doubled’ is closed to new replies.