PDF rendering differs from Print

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #1597

    Can any one explain how to have the pdf export looking similar to the print preview? Previously the Print review and PDF rendering were very similar. Now PDF seems to be one long column with the summary moved to the left side from the right. One alternate template (eg-invoice) is nearly correct but is missing some Labels (in the Biller section for example).

    I have downloaded and installed master_2020.zip- version 2020.3.11 update date 20211016. It has the the sample data with minimal changes to custom.config.ini viz:
    exportPdfPaperSize = A4
    localLocale = en_GB
    localCurrencyCode = GBP
    and to Si Defaults (tax = Vat and Language = Englis(h(UK) (en_GB). It shows these settings:
    Default Biller:
    Default Customer:
    Default Invoice:
    Default Invoice Preference: Invoice
    Default Invoice Template : default
    Default number of line items: 3
    Default Payment Type: Cash
    Default Tax: VAT

    A recent Debian update to openssl finally broke PDF rendering in version 2013.1.beta.8 using PHP 5.6 and a much postponed upgrade is now essential.

    Having been a very satisfied user of SI for the past decade and I have long wanted to update to Fearless359


    It looks fine to me using the settings you gave. There is a problem in the rendering of the amount fields in the first section not interpreting, £, as the British Pound sign. But otherwise, the rendering looks pretty much the same in the Export to PDF, and the Print options. I also checked the PDF attachment on the email. All looked fine. Here are the settings I used.

    In config/custom.config.ini:

    [exportWordProcessor] => doc
    [exportPdfDefaultFontSize] => 7
    [exportPdfPaperSize] => A4
    [exportPdfLeftMargin] => 15
    [exportPdfRightMargin] => 15
    [exportPdfTopMargin] => 15
    [exportPdfBottomMargin] => 15
    [versionName] => 2020.3.11
    [versionUpdateDate] => 20211016
    [localLocale] => en_GB
    [localCurrencyCode] => GBP
    [localPrecision] => 2

    In Inv Prefs:

    Currency sign: £
    Currency code: GBP
    Invoice heading: Invoice
    Invoice wording: Invoice
    Invoice detail heading: Details
    Language: en_GB
    Locale: en_GB

    I’ll work on the amount rendering issue but otherwise, looks fine to me. Make sure you are running the latest version and attach the PDF if it is still a problem. I’ve attached the PDF that I generated. The first with my standard settings and the second with your settings.


    Many thanks, yes I get something similar once I changed the Font setting from 12 to 7.

    Previously with version 2013.1.beta.8 the layout was:
    logo etc at top
    then biller details on left with summary to the right
    then customer details on left
    then notes and details below
    I have attached redacted sample.

    I guess the question should be “Is there a similar template?” or do I need to create it?

    Again many thanks for your help


    This appears to be a bug in the MPDF library used to generate the PDF from HTML code. I’ve documented and reported it to the site that maintains this code. Hopefully they can find and fix it quickly but until then, I have no solution.


    Got a quick response on this issue. Turns out that floating tables is not supported in the MPDF library. That means the template has to be rewritten to merge the right float ant the left positioned tables as a single table. I’ll work on that and let you know when I have a solution.


    Many thanks


    I would be interested to see what you can do as well.

    This is basically what is stopping me from upgrading to the latest version at the moment. I tried to rewrite my template but it is just not as good as it was!


    I tried rewriting the default template to not use floats. The logic got significantly convoluted when dealing with optional fields like various phone numbers and custom fields. If you can eliminate the fields you really don’t use so the logic doesn’t have to test if the field is empty and such, then the logic should be more straight forward. Other than that, I don’t have a lot of suggestions. I did got back to the SI 2011 and 2013 libraries and I’m not sure they supported floating tables in PDF. I might try to install an old version just to test and see.


    I had been running 2013.1.beta.8 with php 5 on debian 11 (bulseye) until an openssl update got in the way. I have set up a vm running debian 8 (jessie) which has an older version of openssl which lets me run 2013.1.beta.8 with php 5 (albeit without my logo and cannot send email). That might be a useful way to install an old version. When I get time over the next few weeks I will have another attempt at the default template. Your insights will be very helpful. Thanks again

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.