Document Creator 0.9.10: Images that fill the page, and per-section headers
Document Creator 0.9.10 adds a way for an image to fill the rest of its page, and composed documents now keep each template’s own header and footer instead of inheriting the first one.
Fit page
An image list slot now has an Image size setting in the template’s variable form: Fit width, as before, or Fit page. With Fit page, a single-column slot scales its images to the space left on the page, allowing for the header, footer and content above it. A host can tune the small margin left over with the :page_fit_safety_pt setting.
Headers and footers per section
When a document is composed from several templates, an appended template whose header or footer differs from the one before it now gets its own, rebuilt from the template. A header or footer the module can’t copy faithfully, such as one with page numbers, a floating image or a drawing, keeps the inherited one and a warning is logged.
Also fixed: image slots in a landscape section are sized to that section’s width, a header or footer table with several rows no longer fails the whole document, and a zero margin is read as zero.
Full release notes: Document Creator 0.9.10
0.9.10 · 23 September 2026
Added
image_listslots can fill the rest of their page. A newfit: "page"config (a “Fit page” / “Fit width” select in the variable form) scales a single-column slot’s images tomin(box width, available height), and the available height accounts for the section’s header, footer, and the content ahead of the slot. The residual margin can be tuned per host withconfig :phoenix_kit_document_creator, :page_fit_safety_pt, 8.0.- New
GoogleDocsClient.section_boxes/1,header_extent_pt/2, andfooter_extent_pt/2: each section’s own page box and estimated header/footer heights. - A composed document’s appended sections keep their template’s own header and footer. When the template’s differs from what the section would inherit, a fresh header/footer is created for that section and the template’s content (text, rules, tables, cell images) is rebuilt in it. Header/footer placeholders are filled from the section that owns the segment.
Fixed
- Image slots in a composed document are sized against their own section’s width, so images in a landscape section no longer get the portrait width.
- A header/footer table with more than one row no longer fails the whole compose; each cell’s style is addressed at its real row and column.
- A template header/footer the replay can’t rebuild faithfully (page numbers, a floating or non-cell image, a drawing) keeps the inherited one instead of getting a lossy copy, with a warning logged. Only external URL links are copied.
- A zero margin or cell padding, which the Docs API sends without a magnitude, is read as 0pt rather than falling back to the default.
- Tables and inline images ahead of a
fit: "page"slot count at their estimated height.
Document Creator 0.9.10. Install or update: {:phoenix_kit_document_creator, "~> 0.9"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.