Problems with background image in normal Mode


I migrated our Invoice Ninja 4 Install to 5 and tried to create our invoice Template.

I used the normal “Plain” Design to start and tried to insert out background image(we have one with a watermark).

In the CSS Section in Body I added the following:
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
font-size: “$font_size”;
zoom: 80%;
background-image: url(‘https://SERVER/images/Watermark.jpg’);
background-repeat: no-repeat;
background-size: 100% 100%;

In HTML Preview Mode the watermark is correctly displayed and everything is working in the “normal” mode and in Invoices it is not visible.
We use the NINJA_HOSTED_PDF=true PDF creator.

Does anyone fixed this issue I only changed the CSS body section doesnt changed anything other then that from the Plain template.

Greetings David

@ben do you have any thoughts?

I tested a little bit more now:

Phantomjs with local binary results in cant open PDF on invoice ninja but in the log I see that the PDF is succesfully created in https://Server/tmp_pdf/string under that URL I can open the PDF so with watermark

Ninja_Hosted = no watermark

snappdf = is working :slight_smile: so I will use the snappdf if the other thigs are also working with is (mail invoice …)

If you need to debug the ninja hosted I will still be available for this thread otherwise we can close it.

Greetings David

Was to early with snappdf I have some space at the edges (with Phantom and HTML preview not -,- )

edit: with Tech Design its working without edges (crazy that every converter has different results but ok I need the focus on one)

I found a bug I wanted to only display the postal code and the city so I used
$client.postal_code $

the postal code works but with the city variable I get
in the PDF instead of the actuall city.

Other Variables that uses city are working
for example
so maybe the $ variable is not implemented ?


@ben do you have any thoughts?

Looks like $ isn’t available. I’ve added this to backlog and will let you know once it’s get available.

The $ variable is now supported.

Yes thank you its working :slight_smile:

1 Like