Repository navigation
Prepare 0.3.0: Word export on php-docx 1.18, and the first Packagist release - #6
Merged
Merged
Conversation
…ictures php-docx 1.18 writes several sections and floating pictures. - Each run of pages with the same size, margins, header, footer and layer pictures becomes its own Word section, so a later page keeps its setup and headers instead of taking the first page's. Pages that look alike stay one section joined by page breaks, so existing output is unchanged. No blank page at a section break, and a section without a header or footer no longer shows the previous section's. - Images, QR codes and SVG in a background or overlay layer float from the section's header at the positions the PDF draws them (checked against the PDF layout for widths, margins, alignment, anchors and percentages), so they repeat on every page. Other layer content is still dropped and now reported at its own path. - The page-size patch is gone: php-docx writes any page size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From review of the floating-pictures change, each checked against the PDF layout: - Padding and border on a layer picture: the picture sits inside them, and the next background picture below the whole box. Word can't draw the border or background, so they are reported as dropped. - A picture aligns inside an overlay place that has a width. - An overlay place without a width is as wide as its picture asks (width, else natural size), so height-only, max-width and percentage widths come out as in the PDF. - A percentage width is of the space left after the margins, in the body as well as in layers. - An empty overlay place is ignored instead of reported (strict mode threw on it). - No blank page when a page opens with a page break, at a section break or within one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Core's branch alias is 0.3.x-dev; Laravel and DOCX require papercut/core ^0.3 (Laravel's dev and path pins for DOCX too). - CHANGELOG: the unreleased 0.2.0 section becomes 0.3.0, noting that 0.1 and 0.2 were never published. The date goes in at tag time. - READMEs and the site say 0.3 and drop "not yet published"; the Laravel README's path-repository install steps give way to composer require. Before 1.0, a minor version may change the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Word export on php-docx 1.18 (sections and floating pictures landed upstream in php-docx#10):
0.3.0 release prep:
0.3.x-dev; Laravel and DOCX requirepapercut/core ^0.3.[0.3.0] - unreleased, noting 0.1 and 0.2 were never published.composer require.papercutvendor name is free on Packagist.How it was checked
After merging
## [0.3.0]in CHANGELOG.md and add a fresh## [Unreleased].git tag -s v0.3.0 -m "Papercut 0.3.0" && git push origin main v0.3.0—release.ymlruns every suite, splits and tags the three packages, and creates the GitHub release.papercut-core, thenpapercut-laravelandpapercut-docx, at https://packagist.org/packages/submit.composer require papercut/core papercut/laravel papercut/docx.🤖 Generated with Claude Code