PDF Export crash on Catalina

Hello,

Since I’ve updated to MacOS Catalina I cannot export to PDF anymore. The app freezes and I get this error:
19.10.30: System.NullReferenceException: Object reference not set to an instance of an object
at #=zSmX8hKcJs3r8WAikExzFz_gdA9$VMjACQQ==.#=zd$zHhy4I$g9ujS4r$z$isAM= (System.Int32 #=zmC9yUUf1BTke) [0x00032] in <125cd5dc7a46453df2a18935259c1fde>:0
at #=z1X$ucdkRT2mjoOBeBtBke1422hTM7CCN1A==+#=zO1vrT1CgqJVVJFuE8Yu1rJI=.MoveNext () [0x00105] in <125cd5dc7a46453df2a18935259c1fde>:0
at Apitron.PDF.Kit.FixedLayout.Resources.Fonts.Font.#=zgxZDzbJ5pKSTmJ8WwbtuWV4= (System.String #=zRgl5CMw88Mov, System.Int32 #=zb1oTWqM=, System.Char #=znYkqaxHU5cONbEmIXA==) [0x0035d] in <125cd5dc7a46453df2a18935259c1fde>:0
at Apitron.PDF.Kit.FixedLayout.Resources.Fonts.Font…ctor (System.String resourceID, System.String fontDefinition, System.Int32 fontIndex) [0x0000f] in <125cd5dc7a46453df2a18935259c1fde>:0
at #=zcl6DiKLvmrKZdr_ZqydUq0lUaPcWPE7zGR_aBPQ=.#=z5VnhiZw= (#=zrIY124Gq7rWVn1GetO$Q9qPEhFs5SJBhME_fvBY= #=zMmlCtjg=) [0x0008e] in <125cd5dc7a46453df2a18935259c1fde>:0
at #=z5QUDtrbUprQ$Ll0KlsZ4AIOrZZiw7k58kmz1N9CzH2_2…ctor (System.String #=z_iX2LME=, #=zcl6DiKLvmrKZdr_ZqydUq0lUaPcWPE7zGR_aBPQ= #=zhjHfyj4o6RT7, System.String #=z0DbwhQpBiqHB, System.Double #=zEwPpQjhldqp2, System.Double #=zioKsTS8DJk3x, System.Double #=z7rEmzS4=, System.Double #=z53vVC0HkOSAd, System.Boolean #=zt$Juw6Zw0qmv) [0x000be] in <125cd5dc7a46453df2a18935259c1fde>:0
at Apitron.PDF.Kit.FlowLayout.Content.TextBlock.Measure (Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x0010a] in <125cd5dc7a46453df2a18935259c1fde>:0
at ManagerServer.Extensions.PdfConverter.GetMinWidth (Apitron.PDF.Kit.FlowLayout.ContentElement contentElement, System.Boolean nowrap, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x0007e] in :0
at ManagerServer.Extensions.PdfConverter.GetMinWidth (Apitron.PDF.Kit.FlowLayout.ContentElement contentElement, System.Boolean nowrap, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x000f4] in :0
at ManagerServer.Extensions.PdfConverter.GetMinWidth (Apitron.PDF.Kit.FlowLayout.ContentElement contentElement, System.Boolean nowrap, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x000f4] in :0
at ManagerServer.Extensions.PdfConverter.Tr (AngleSharp.Dom.Html.IHtmlTableRowElement node, Apitron.PDF.Kit.Styles.Text.Font font, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x0014b] in :0
at ManagerServer.Extensions.PdfConverter.Table (AngleSharp.Dom.Html.IHtmlTableElement node, Apitron.PDF.Kit.Styles.Text.Font font, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x000f3] in :0
at ManagerServer.Extensions.PdfConverter.ContentElement (AngleSharp.Dom.INode node, Apitron.PDF.Kit.Styles.Text.Font font, System.Boolean nowrap, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x00016] in :0
at ManagerServer.Extensions.PdfConverter.ContentElement (AngleSharp.Dom.INode node, Apitron.PDF.Kit.Styles.Text.Font font, System.Boolean nowrap, Apitron.PDF.Kit.FixedLayout.Resources.ResourceManager resourceManager) [0x00180] in :0
at ManagerServer.Extensions.PdfConverter.Tr (AngleSharp.Dom.Html.IHtmlTableRowElement node,

I’m running the latest version of Manager.

Hope you can help me!
Best regards,
Boyd

This is not a problem related to the Catalina operating system, nor is it universal within Manager v19.10.30 (the one you were using). I can generate and save PDFs from multiple businesses, multiple tabs using Catalina on that version of Manager.

Are you using a custom theme? If so, does the problem persist when using the built-in Plain theme? Your dialog box shows many issues with fonts. It may be you are using a custom theme that references fonts incompatible with Catalina’s 64-bit-only architecture.

What transaction or report types does it affect?

The plain theme seems to work. I have issues on an invoice export

Please clarify. Invoices cannot be exported, as that term is used in Manager. And is the “export” issue different from the PDF crash?

I mean generating a PDF with the PDF button when viewing an invoice.

I’ve now tried my theme with 3 different fonts, (Verdana, Avenir Next and Arial) and they all 3 crash

This is the code of the theme I’m using:

<table style="font-family: Verdana; padding: 30px; line-height: 1.7">
<thead>
    <tr>
        <td colspan="99">
            <table style="margin-bottom: 20px"><tr>
                <td style="font-weight: bold; font-size: 32px">{{ title }}</td>
                {% if business.logo != null %}<td style="text-align: right"><img src="{{ business.logo }}" style="max-height: 80px; max-width: 160px"></td>{% endif %}
            </tr></table>
            
            <table style="margin-bottom: 20px"><tr>
                <td>
                    <div><b>{{ recipient.name }}</b></div>
                    <div>{{ recipient.address | newline_to_br }}</div>
                    <div>{{ recipient.identifier }}</div>
                </td>
                <td style="padding-right: 20px; text-align: right">
                    {% for field in fields %}
                    <div style="font-weight: bold">{{ field.label }}</div>
                    <div style="margin-bottom: 10px">{{ field.text }}</div>
                    {% endfor %}
                </td>
            </tr></table>

            <div style="font-size: 13px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
        </td>
    </tr>
    <tr>
        {% for column in table.columns %}            
        <td style="font-weight: bold; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 0px; border-bottom-width: 0px; border-top-width: 0px{% if forloop.last == true %}; border-right-width: 0px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
        {% endfor %}
    </tr>
</thead>
<tbody>
    {% for row in table.rows %}
    <tr>
        {% for cell in row.cells %}
        <td style="padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 0px{% if forloop.last == true %}; border-right-width: 0px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
        {% endfor %}
    </tr>
    {% endfor %}
    {% for column in table.columns %}   
    {% if column.label != 'code' %}
        <td style="border-bottom-width: 0px; border-left-width: 0px{% if forloop.last == true %}; border-right-width: 0px{% endif %}">&nbsp;</td>
    {% endif %}
    {% endfor %}
    {% for total in table.totals %}
    <tr>
        <td colspan="{{ table.columns | size | minus:1 }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
        <td style="border-color: #000; border-left-width: 0px; white-space: nowrap; border-right-width: 0px; border-bottom-width: 0px; padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
    </tr>
    {% endfor %}
    <tr>
        <td colspan="99">
            <div> </div>
        </td>
    </tr>

    {% for field in custom_fields %}
    <tr>
        <td colspan="99">
            {% if field.label != 'Opmerkingen' %}<div style="font-weight: bold; padding-top: 20px">{{ field.label }}</div>{% endif %}
            <div>{{ field.text | newline_to_br }}</div>
        </td>
    </tr>
    {% endfor %}

    {% if emphasis.text != null and emphasis.positive %}
    <tr><td colspan="99"><div style="text-align: center; margin-top: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
    {% endif %}

    {% if emphasis.text != null and emphasis.negative %}
    <tr><td colspan="99"><div style="text-align: center; margin-top: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
    {% endif %}
        
</tbody>
<tfoot>
    <tr>
        <td colspan="99">
            <table style="margin-bottom: 20px"><tr>
            <div style="font-weight: bold">{{ business.name }}</div>
                    <div>{{ business.address | newline_to_br }}</div>
                    <div>{{ business.identifier }}</div>
                </tr></table></td>
        
    
</tr></tfoot>

This forum is not the place to obtain debugging help for your custom themes. But I notice your first line of code does not exactly follow the Guide: https://www.manager.io/guides/18025. Also pay attention to the Caution at the end. You are really on your own for this. And understand that because Manager’s internal PDF generator must handle 80-plus languages, some with different alphabets, font substitutions are one of the trickier things to handle in custom themes. Less adventurous is usually wiser.

1 Like

I have a similar issue (different error, not related to a theme, but same process). If I create a new business, no theme at all, I can recreate the problem on on Mac OS 10.14.5.

Recently upgraded to 21.1.54 (Desktop edition) and now I can’t generate PDFs or print any of my quotes or invoices. I could prior to upgrade. Other software on my Mac can generate PDFs without issue, so it seems local to the recent update of Manager. Has anyone else had this issue / got any advice? Thanks!

Have you read this topic

The version of Manager I used to use on my Dell, I could save quotes, invoices and purchase orders as PDF files. My Dell died and now I’m using my Mac for work. There is no longer a Save To PDF or whatever tab I used to have. Now I have to “Print” and then go to Save As A PDF. It’ll save, but it crashes the program every single time and I can’t figure out why.

First, what you describe is not a function of Manager. When you use the Print button, you are relying on built-in features of macOS. So the problem will most likely lie there. Frequently, PDF problems are related to fonts.

You need to furnish more information:

  • What version of Manager?
  • What edition (desktop, server, or cloud)?
  • If server or cloud, what browser are you using?
  • What version of macOS?
  • Are you using a custom theme?

Exactly, what happened to mine ! (Desktop Version)

I have no problem before Mac OS Catalina till then OS Big Sur (with MacAir M1)
Have to use the same method as yours i.e. “Save As PDF” , but
even though it crash (not every time only some time) file still at the destination I saved.

I used built in theme, it crashed both Plain and Customized Built-in-Theme.
Content in my various forms is with both English and Thai language (to comply with taxation rules)

Hope this provide more details of the problem. I leave it as it is, since the file is at the desired destination. Over all I pleased with Manager, and it is free no complaint, but this hold me back
for further up with Paid Cloud Edition tho !

p.s. I used 21.8.61 at the moment