Skip to content
MyAppBuilder
BetaGuide

Documents (print and PDF)

The Document component turns one record and its line items into a printable business document: a quotation, a purchase order, a work-order report, an inspection report or a receipt. People open it with Print / Save as PDF and use the browser's print dialog, or attach it privately

Beta — ready to use, but some details may still change.

The Document component turns one record and its line items into a printable business document: a quotation, a purchase order, a work-order report, an inspection report or a receipt. People open it with Print / Save as PDF and use the browser's print dialog, or attach it privately to the record. This feature is in beta.

How it works

  1. You place a Document on the details page of a record (for example /quotes/:id) and bind its Data to that record, like a Detail View.
  2. You choose the document type, the number and date fields, the header fields, the line items table and its columns, and an optional column to total.
  3. When someone clicks Print / Save as PDF, MyAppBuilder renders the document on the server, for that person: the record must be readable by their role, hidden fields are left out, and only line items they can read are listed. The page opens in a new tab with print styles (A4 or Letter, repeated table headers, no page breaks inside rows).
  4. With Attach to file field set, Attach to record stores the document as a private file in that field of the record. Only people who can read the record get a (temporary) link to it.

PDF files

MyAppBuilder doesn't create PDF files on the server. Producing reliable PDFs for every language and script needs embedded fonts and a layout engine, which we don't ship; instead the printable page is designed for the browser's Save as PDF printer (Chrome, Edge, Safari and Firefox on desktop; Share › Print on iOS and Android). Attached documents are stored as print-ready HTML pages, opened the same way.

Examples with the business starters

The tables below exist in the starters of the app library. Add the component yourself — starters don't include it yet.

DocumentPage / DataHeader fieldsLine items (link field → columns)Total
Quotation (Sales pipeline)Quote details, Data: Quotes where ID = page id; number: Quote Number; date: Valid UntilAccount, Contact, StatusQuote Lines (Quote) → Description, Quantity, Unit Price, Line TotalLine Total
Purchase order (Purchase to Receive)Purchase order details, Data: Purchase Orders; number: PO Number; date: Expected DeliverySupplier, Supplier Reference, StatusPurchase Order Lines (Purchase Order) → Description, Quantity Ordered, Unit Price— (add a line total column to sum it)
Work order report (Work Order Manager)Work Order page, Data: Work Orders; date: Completed AtSite, Asset, Technician, Status, Resolution NotesChecklist Items (Work Order) → Item, Status, Result, Notes—
Inspection report (Inspections & CAPA)Inspection details, Data: Inspections; date: Scheduled ForSite, Asset, Inspector Email, Result, SummaryInspection Answers (Inspection) → Check, Answer, Notes—
Receipt (Purchase to Receive)Goods receipt details, Data: Goods Receipts; number: Delivery Reference; date: Received AtPurchase Order, Received ByGoods Receipt Lines (Goods Receipt) → PO Line, QuantityQuantity

Quotations show the amounts your workflows stored (Subtotal, Tax Amount, Total as header fields). The Document itself never calculates taxes or discounts.

Attaching a document to a record

  1. Add a file field to the table, e.g. Report PDF on Work Orders.
  2. Select it in Attach to file field on the Document.
  3. Give the roles that should attach documents update access to the table, and make sure the field isn't read-only for them.
  4. Optional: use the Generate document action with Attach on, e.g. after the "Complete job" button's update.

Every attachment is recorded in the project's audit log (component, record and file ids — never the content).

Formats

Amounts, numbers and dates use the app's language/locale, currency and time zone (Settings › General): de-DE + EUR prints 1.234,50 €, en-US + USD prints $1,234.50. Calendar dates print as the same day everywhere; date-time values are shown in the app's time zone. Choice fields print their labels, yes/no fields print Yes or No, linked records print their display name (or — when the viewer can't read the linked record).

Security

  • Everything printed is escaped; record values can never inject HTML or scripts. The printable page loads no external resources and runs no script except its own print button.
  • The browser only sends the component and the record id; the server checks the page and component are visible to the user and applies table, record and field permissions.
  • Attached files are private: they are served only with a short-lived signature, which the server adds when the record is returned to someone allowed to read it.

Limitations

  • No server-side PDF; use the browser's Save as PDF.
  • No taxes, discounts, currency conversion or legal/tax-compliance features — documents print the values your app stores. Don't use them as tax invoices where regulations require certified invoicing.
  • Up to 500 line items; images and logos aren't embedded.
  • Notes, footer and labels are fixed text (no record placeholders).
  • Not available in sandboxed demos and template previews.

Related

Was this helpful?