First off thank you very much Kovah and team for such a fantastic piece of open source software.
I’m setting up IP for the first time and am almost finished. There is one thing left that I am really struggling with.
I would like to add some text asking for a signature on the bottom of each page of an invoice pdf. The difficult part is that I don’t want it to appear on the bottom of the first page.
So show on bottom of:
Page 1: No
Page 2: Yes
Page 3: Yes etc
I saw that IP uses “:nth-child” CSS in templates.css to change the colour of each row in the table with class “item-table”.
So I tried adding this in the PDF Footer box in the settings:
Would greatly appreciate any help with this. Still haven’t been able to figure this out or find a solution… @Kovah@Pitma Any other clever people know how to do this??
I have tried adding a basic html table in my php invoice pdf template. Using the same CSS styling used in template.css for the table with class “item-table”, I was able to change the background colour. However, when I try to do this for <div>, <p><h> tags I can’t get it to work?
It seems that in InvoicePlane you can only use :nth-child() with tables?
@samful Please let me know if you get any closer and I will do the same.
Really hope to be able to get this working.
PS I am using the same approach as my initial support comment. I am adding the div stuff to PDF Footer in settings menu and then adding the CSS in between style tags in the head of my custom php invoice template.
@deputy I have been looking for a solution, but I don’t think I am going to be able to find one…
According to mpdf (https://mpdf.github.io/css-stylesheets/supported-css.html) nth-child can only be used for TR, TD and TH tags. I really thought that using this nth-child was the solution, but my HTML and CSS knowledge is not good enough to work out how to solve our problem.
I understand we have the same problem and we want to hide the first and last instance of a table, but I can’t think how to do it…I hope @Kovah or someone can help us, they may be our only chance
@samful Well that explains why :nth-child() isn’t working on my divs :-(. So I guess we can’t get this to work with that idea. But is there another way to achieve this?
I agree our only chance is @Kovah, or @Pitma unless there are any other clever people reading this…
put in the PDF footer block of the System Invoice Settings page the following code:
<div class="page-hide-{PAGENO}">{PAGENO} of {nb}</div>
Then find the file called “custom-pdf.css” it should be in this folder: /assets/default/css
Here you add the class which is mentioned above and tagged by the page number.
You almost answered your own question, it was fun taking up the challenge!
Code to add in CSS file: /* Hiding content in PDF Footer block based on pagenr. in PDF */ .page-hide-1 { display:none; }