Skip to content

Page transitions: /Trans and /Dur - #60

Merged
tannevaled merged 1 commit into
mainfrom
feat/page-transitions
Nov 8, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/page-transitions

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

Page.SetTransition(Transition{...}) writes a page's /Trans dictionary and Page.SetDisplayDuration its /Dur, as PDF 32000-1:2008 12.4.4.1 (Table 162) defines them: style (Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Push, Cover, Uncover, Fade), /D, /Dm, /M, /Di. Defaults are not written.

The entries Table 162 limits to some styles are refused for the others, and so are the values of /Di a style does not take (90 and 180 are Wipe only, 315 is Glitter only). Fly (which also needs /SS and /B) is not offered.

Why

go-slides carries a slide's transition into its PDF (go-slides/slides, the export-animations PR). No issue is referenced.

Checked

  • transition_test.go reads the file back through the independent reader (rsc.io/pdf), classic and packed into object streams, and asserts the refusals.
  • go vet, go test ./... of the root package.

Bibliography opened: PDF 32000-1:2008 12.4.4.1, Table 162 and Figure 56 (ISO 32000-2 was not reachable: 403).

🤖 Generated with Claude Code

Page.SetTransition writes the transition dictionary of PDF 32000-1
12.4.4.1 (Table 162): style, /D, /Dm, /M and /Di, refused where the table
says the style does not take the entry or the value (Di 180 and 90 are
Wipe only, 315 Glitter only, Fly is not offered). Page.SetDisplayDuration
writes the page's /Dur.

A slide deck's presentation mode needs them: go-slides carries a slide's
transition into its PDF.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 039fbe6 into main Nov 8, 2026
2 checks passed
@tannevaled
tannevaled deleted the feat/page-transitions branch November 8, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant