Printing invoice

I think there are a couple of misunderstandings here.

  1. @Tut is just a forum moderator here; though he has a lot of experience with the software and a saint’s patience in providing assistance for it, he doesn’t have any contact with or input into the development of the software itself. @lubos is the software developer.

  2. The problem with the print button is that the rendering gets done by the web browser on your computer, whereas the PDF rendering (whether you click PDF or E-mail) is done through the Manager software - so the two are created using entirely different paths. I experienced this first-hand when helping a customer with his move onto the server edition of Manager, when he asked me why printing invoices included URL headings and page counts.

To confuse things even more, the desktop version of Manager for Windows will always use the Windows rendering engine, which is Internet Explorer for older versions of Windows and (presumably) Edge for Windows 10 - irrespective of what your preferred/default web browser is set to (I’ve tried installing Manager Desktop on a machine without Internet Explorer in the past, and it failed to run).

A diagnostic approach would entail creating an identical HTML page and loading it into IE/Edge (depending on your operating system), then seeing how it renders and prints from there. Unfortunately, I have no idea of how one could extract the HTML generated by Manager to perform this test.

Thank you @Cognicom for the update.
OK, @Tut is a forum moderator and I appreciate the time he spends to enlighten everyone here.
I was addressing him, because he had claimed that there is no wrong with the application.

Being a developer myself, I know that when there are different results for the same thing when using different paths, there is definitely a bug. Either the application has not controlled enough the process and outer factors had impact on the result, or there is an error.

My proposal - I see now it must be addressed to @lubos - is to use the PDF extraction in the PRINT button also, with the additional instruction to guide the produced PDF directly to the printer. I understand that there will be the requirement of Adobe reader installation, or the adobe reader API embedded in the application. This will solve this issue.

For what it’s worth, I tried creating a PDF directly from within Manager today, and it came out exactly as I wanted it to. I hadn’t changed anything since I had trouble with the fonts last time, so I was surprised, and confused. I’ve since done some experimenting, and it looks like sales invoices that are unpaid when I make the PDF are fine, but those that have been paid (and have the payment reflected on the sales invoice) give me problems with the font. I’ll have a look at my custom theme to see if I can find anything that might be causing the issues.

Another thing I’ve noticed, which has happened with the invoices that use the correct font and those where it has been replaced, is that sometimes the total amount splits onto two or three lines, as if its container is too small. As this is a different issue I’ll try searching elsewhere for topics discussing this. (And I’d be happy to move my posts from here into a different thread if that would be more useful.)

@GrahamvdR, what edition are you using? Desktop, server, or cloud? If cloud, that is always up to date. There may have been unannounced changed that affected this since several people have complained recently. Or if you updated your desktop or server edition yourself, the same might be true.

I was using the last desktop version from last month, 18.10.96 if I remember correctly. Then after I posted the message above I thought I had better try with the latest version to check if things have changed. So I’ve updated to 18.11.27. The font issue seems unchanged, and now all invoices that I’ve tried to convert to PDF seem to have the totals split across lines, even ones that didn’t in the previous version I was using earlier today, and one where the balance due is “$ 0.00”. As well as that, it takes about 5 to 7 minutes for Manager to generate the PDF, with elevated CPU usage during that time. I’ve restarted Manager and rebooted my PC several times, to no effect.

I cannot reproduce either problem. Does this happen only with custom themes, or does it also happen with the built-in Plain theme?

I’ve tried one of my sales invoices with the built-in Plain theme, and that’s fine. It’s also fine with the Bold Gray theme, which is the one I modified to get to my custom theme.

I’ll see if I can spend some time looking at my custom theme more closely, and trying with some other fonts, default fonts, default colours, etc. What I find most surprising is how it’s now taking so long to make the PDF, but only since I updated to the latest version. About 5 to 8 minutes every time. There were issues before, but it generated the PDF very quickly.

Definitely it shouldn’t take 5-8 minutes to generate PDF. Does it take that long even with built-in theme?

No. With the built-in Plain theme and Bold Gray themes it’s quick. It only seems to be with my custom theme that it takes so long.

I started with the Bold Gray theme to create my custom theme. The only changes I made were to colours, fonts, and moving custom fields around. (I have conditional statements that place two custom fields at the top, and all others at the bottom.) Let me know if it would be useful for me to share my custom theme. And just to reiterate: my custom theme was just as fast as the built-in themes before I updated to 18.11.27 yesterday.

You can send me your custom theme to lubos@manager.io and I will try to reproduce the issue.

Thanks for this information. It’s very helpful for understanding how Manager works, and potentially where issues might creep in.

Thank you. I’ve sent it. I’m curious to see if you can reproduce it or not, and if so, what elements might be causing the issue.

Having done some more experimenting, I’ve made some observations:

  1. Removing custom fonts makes the PDF generation fast again
  2. Using system fonts (Arial, Georgia, Calibri, Times New Roman) as the custom fonts makes it fast too, and the PDFs display as expected.
  3. Using other fonts slows down the PDF generation (slower with fonts from bigger families, it seems), and has mixed results in the PDFs, with some fonts displaying correctly, some only in the bold variation, and some not at all.
  4. Examining the PDFs, it looks like the custom fonts are not embedded properly, while using no font results in NotoSans being used and embedded.

So for now I’ll just work without my custom brand font. Noto is certainly not a bad fallback option, and at least the generation is fast and the colours and other elements seem to be working properly for me.

Apologies to @Dimitris_Kontodimos – I seem to have hijacked your topic!

@GrahamvdR don’t apologize. In fact I want to thank you. It was very enlightening to me watching your conversation with @Tut and @lubos.