Skip to content

Commit 78c22e1

Browse files
committed
Merge branch 'main' into feature/add-page-object-number
2 parents 3a2df17 + 146cde1 commit 78c22e1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@embedpdf/pdfium': patch
3+
---
4+
5+
Fix page layout shifting after editing PDFs whose `/Contents` is a split-stream array (e.g. after redaction).
6+
7+
PDF renders `/Contents` as one continuous program, so graphics state set in one stream carries into the next. The previous behaviour rewrote only the dirty streams while keeping the original split boundaries, which could corrupt the graphics-state handoff between streams and shift the visible layout. `CPDF_PageContentGenerator::GenerateContent` now collapses all active page objects into a single canonical content stream when the page has been edited, via `GenerateCanonicalPageStream` + `CPDF_PageContentManager::ReplaceWithSingleStream`. Form XObjects keep their existing single-stream behaviour.

0 commit comments

Comments
 (0)