You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug Report] [DeckCraft] PDF text layer maps the slide-number field to a single angle quote #1153
In place_text: the cloned PlacedText.body gets each field run replaced by a text run holding its value, so every reader of body sees the value
PlacedText.body stays as saved; a new PlacedText.shown holds each paragraph as laid out, built by a new public deckcraft_text::shown_paragraphs that shares shown_run with the layout code. The PDF code reads shown
Line break (Break run)
PDF code joins Run::content() (one \u{b}), the count the layout uses
shown_run returns \u{b} for a break, the same count
Date and time fields
Also threads one RenderOpts { now } through the two rasters and the text layer (new public place_slide_with)
Not touched. On main each SlideFields::new reads the clock itself (opts.now.or_else(DateTime::now_local), crates/render/src/opts.rs), so the raster and the text layer read it separately. I did not try to reproduce a mismatch
New tests
2 in deckcraft-pdf (slide number on 3 pages, line break), 2 in deckcraft-render (field value in PlacedText, date from the given options)
The same 2 in deckcraft-pdf; none in render or text
ROADMAP.md
not touched
adds a row
Behind main
518 commits
233 commits
Merge with main
conflicts in pdf/src/lib.rs, render/src/lib.rs, render/src/tests.rs
conflicts in ROADMAP.md and text/src/lib.rs (the text code moved in the module split)
Checks
the 2 listed pass
the 2 listed pass
Both together
conflict with each other in pdf/src/lib.rs, pdf/src/tests.rs, render/src/placed.rs and render/src/tests.rs
What I did and did not do:
Read both diffs, the current placed.rs, text_layer and master_text_pieces in pdf/src/lib.rs, and ran git merge-tree of each head against origin/main and against each other. I did not build or run either branch. A reviewer on each PR reports running cargo test and clippy on the head, and the reproduction on main, which I did not repeat.
Real PowerPoint 16.0 (build 20527), through its COM interface, as a reference for what the text layer should hold: three slides, each with a text box containing a slide-number field and a second box with a line break (Shift+Enter), saved with Save As PDF. I decoded the page content streams' text-showing operators with a short script (Word hung when asked to open the PDF, so it was not used). Page 1, 2 and 3 hold the strings 1, 2, 3 for the field, not a placeholder; the line break gives two separate text lines (one, two) with no break character. That matches the "Page 1/2/3" and "onetwo" expectations in both PRs' tests. Date fields were not checked in PowerPoint.
Not checked: whether a hyperlink placed after a field in the same paragraph still gets the right box (the link lookup in place_text runs on the saved body in both PRs), and the web build.
Activity
ticket-craft commentedon Oct 22, 2026
Possibly related: #62.
MarekSpodBiedry commentedon Oct 22, 2026
I'm working on this.
Keep the PDF text layer aligned with line breaks, use one clock readi…
Harrison-Booth commentedon Oct 28, 2026
Comparison of the two open PRs for this issue: #1192 and #1197. Nothing here picks one; it is what I checked.
pdf/lib.rs,pdf/tests.rs,render/lib.rs,render/placed.rs,render/tests.rs)ROADMAP.md,pdf/lib.rs,pdf/tests.rs,render/placed.rs,text/lib.rs)place_text: the clonedPlacedText.bodygets each field run replaced by a text run holding its value, so every reader ofbodysees the valuePlacedText.bodystays as saved; a newPlacedText.shownholds each paragraph as laid out, built by a new publicdeckcraft_text::shown_paragraphsthat sharesshown_runwith the layout code. The PDF code readsshownBreakrun)Run::content()(one\u{b}), the count the layout usesshown_runreturns\u{b}for a break, the same countRenderOpts { now }through the two rasters and the text layer (new publicplace_slide_with)SlideFields::newreads the clock itself (opts.now.or_else(DateTime::now_local),crates/render/src/opts.rs), so the raster and the text layer read it separately. I did not try to reproduce a mismatchdeckcraft-pdf(slide number on 3 pages, line break), 2 indeckcraft-render(field value inPlacedText, date from the given options)deckcraft-pdf; none in render or textROADMAP.mdpdf/src/lib.rs,render/src/lib.rs,render/src/tests.rsROADMAP.mdandtext/src/lib.rs(the text code moved in the module split)pdf/src/lib.rs,pdf/src/tests.rs,render/src/placed.rsandrender/src/tests.rsWhat I did and did not do:
placed.rs,text_layerandmaster_text_piecesinpdf/src/lib.rs, and rangit merge-treeof each head againstorigin/mainand against each other. I did not build or run either branch. A reviewer on each PR reports runningcargo testandclippyon the head, and the reproduction on main, which I did not repeat.1,2,3for the field, not a placeholder; the line break gives two separate text lines (one,two) with no break character. That matches the "Page 1/2/3" and "onetwo" expectations in both PRs' tests. Date fields were not checked in PowerPoint.Not checked: whether a hyperlink placed after a field in the same paragraph still gets the right box (the link lookup in
place_textruns on the saved body in both PRs), and the web build.Render tests: import place_slide_with so the date test compiles (stor…
Use evaluated field values in the placed text so the PDF text layer s…
Merge pull request #1192 from MarekSpodBiedry/issue-1153