Commit Graph
8 Commits
Author SHA1 Message Date
Lauri Ojansivu 52b86ef753 Read a PDF export's pictures one at a time as they are drawn, and write it to disk, not memory.
The card and board PDF exports read every picture of the card or board into
memory before making the document, then built the whole PDF in memory too.
Each picture is now a loader: the Unicode PDF writer reads it when it draws
its row and hands it to PDFKit, which embeds it and lets the bytes go, so
one picture is in memory at a time. The document is written to a temporary
file as it is made and sent from there with its length, so it is not held
in memory either, and the base-font fallback still takes over when the
Unicode PDF fails - reading the pictures only then. Removed from TODO Later;
the Excel half stays there with what blocks it.

Thanks to markusst1982 and xet7 !
2026-10-09 23:13:44 +03:00
Lauri Ojansivu e487f8d913 Keep each chart PDF export row on one line, in fixed columns.
Reported directly: in the Frappe Gantt view's PDF export a row's text was
not on one line. ExporterChartPDF wrote every header and data row as ONE
text line - "title  |  start  |  due  |  end" - with no width limit, so a
long card title pushed the dates off the page edge in the Unicode PDF and
past the line in the base-font fallback, and nothing lined up from row to
row.

New models/lib/pdfDocument.js tableRow(): a row with fixed column widths
(the name column twice the others), a cell that does not fit clipped with
an ellipsis rather than wrapped, so a row is always exactly one line.
buildUnicodePdf draws it as measured cells (PDFKit width + ellipsis); the
base-font fallback gets the same row as padded monospaced runs within the
text width. ExporterChartPDF uses it for the header (grey bar, bold) and
every row of every chart export - Gantt, Time and the report charts share
this exporter.

tests/chartPdfTableRows.test.cjs pins the one-line/aligned-columns/clipping
behaviour and that the exporter no longer joins rows into unbounded text.

Thanks to xet7 !
2026-09-11 10:42:40 +03:00
Lauri Ojansivu ec26abdc91 Bundle portable PDFKit in every release target 2026-08-30 22:40:33 +03:00
Lauri Ojansivu 6c39c6ad32 Keep Windows PDF and Snap release builds portable 2026-08-30 21:31:49 +03:00
Lauri Ojansivu fb52149e94 Align PDF and Excel card attachment layouts.
Place three previews per row with filename-only captions below, retain every attachment in the six-field details table, and draw PDF labels, metadata positions, and checklist progress like the printable Excel card.\n\nThanks to xet7 !
2026-08-17 01:52:34 +03:00
Lauri Ojansivu 4deff691eb Start PDFKit with the embedded Unicode font.
Avoid PDFKit's startup lookup for Helvetica.afm, whose package-relative path is unavailable after Meteor production bundling, so Unicode PDF export no longer falls back to the base-font writer.\n\nThanks to xet7 !
2026-08-17 01:20:38 +03:00
Lauri Ojansivu 9ff542b9b1 Wrap PDF metadata and arrange image previews in rows.
Keep complete date and time values visible, place up to three attachment previews on one atomic row, and caption each preview with its filename and human-readable size.\n\nThanks to xet7 !
2026-08-17 01:17:53 +03:00
Lauri Ojansivu c796fc6c6b Complete multilingual PDF and Excel exports.
Embed OFL-licensed GNU Unifont fonts in PDF exports, centralize the printable Excel card renderer on the shared card document, and consistently use the saved user language or browser fallback plus the opened card's date format. Document the XLSX font-embedding limitation and cover the locale, font, PDF, and workbook behavior with regression tests.\n\nThanks to xet7 !
2026-08-17 00:50:10 +03:00