Invoice PDF css

Is it possible to alter the css of the invoice pdf produced?

The only thing I really want to reduce the 1 inch border running around each page. Cheers

Regards,
Steve

Hi @DesignStitchSew

It’s possible, but it wouldn’t affect just the PDF - it would affect the web view too.

However, with regards to the border, I assume you’re referring to the margin - the white space between the edge of the document and the actual invoice? If so, unfortunately I don’t think this is something that can be changed. However, I will double check and confirm shortly.

[Edit]
In short - yes it can be done with some changes and patience.

The long version - It can be done by decreasing the margin and increasing the width of the .nested-invoice-container class. However, depending on your invoice template, it’s likely that the other elements have set widths too (e.g. a lot of mine were set to around 630px. If you increase the width, these will need to be changed too, to allow them to stretch the full width of the PDF.

You will still be left with some margin due to the way it’s generated, but it would mean it’s reduced.
As a side note - the account I tried this on has the newer PDF engine enabled. This would give you a bit more flexibility too as it supports some of the newer CSS options (like shadows, rotations and just generally easier to use).

I hope that helps!

This topic was automatically closed after 4 days. New replies are no longer allowed.