Skip to content

print: no way to render an image in a .print template - the company logo cannot appear on an invoice #7024

Description

@delchev

Problem

A .print template can interpolate text placeholders only. PrintIntentGenerator, ReportPrintTemplate and the sdk/print Print API have no image emission at all, and function: Attachment (#6371 / #6373) stores files on a record without any bridge into a rendered document.

The everyday case this blocks: the issuer's logo on an invoice. A Bulgarian SME's printed invoice, proforma, credit note and delivery note carry the company logo; every mainstream suite does it, and the suite-side proposal (BusinessIntents BILLING C6, "Company logo") has been parked on exactly this platform piece since 2026-07-09.

Ask

An image placeholder in .print, resolved from an Attachment of the record or of a relation:

{{image Company.logo width=160}}      # or  {{Company.Logo:image}}

where Company.logo names either

  • an Attachment child of the referenced Company flagged for the role (e.g. attachments: { roles: [logo] } on the master, one row per role), or
  • a kind: image to-one on the master pointing at one Attachment row,

and the renderer embeds the bytes (base64 data URI) into the HTML so the same template renders identically in the client Print button, the server-side render behind attach: print, and the function: Snapshot PDF minted on issue. A missing image renders nothing (fail-soft), never a broken-image box. Content type / size limits and a resize hint are the only options needed.

Related: #6371, #6373 (attachments), #6982 (print format specifiers), the old EDM image asks #3862 / #3863 / #3178.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions