Repository navigation
feat: a PDF previews as its first page, with its page count - #167
Merged
Merged
Conversation
A file that starts with %PDF- previews as its first page, drawn by macOS sips like the other images that are not PNG, under the caption "pdf, page 1 of 12, 612×792, 340 KiB". The page size comes from the file's first /MediaBox, so the 50-megapixel guard applies: sips needs about 0.9 GB for a moment to draw the largest page PDF allows. A page whose size cannot be read is drawn no larger than 2048 pixels. The count comes from the page tree's root, and is left out for a file over 4 MiB, of which only the start is read. sips reads the file itself, so a PDF over 4 MiB is still shown. Closes #33 Part of #4 Co-Authored-By: Claude <noreply@anthropic.com>
… like every other value Part of #32 Co-Authored-By: Claude <noreply@anthropic.com>
…d of file sips draws a PDF on nothing, so a page of black text showed dark on the dark preview. The first page is drawn to a JPEG of the best quality first, which sips puts on white, and converted from there. tests/fixtures/preview holds a PNG, JPEG, GIF and SVG of one picture, an SVG without a readable size, a huge SVG, a three-page PDF and a too-large PDF page, with what each should show; a test loads them. Part of #33 Co-Authored-By: Claude <noreply@anthropic.com>
…t is shown Part of #33 Co-Authored-By: Claude <noreply@anthropic.com>
nyxene
pushed a commit
that referenced
this pull request
Oct 28, 2026
Release pull request, maintained by release-please. Merging it creates the tag and a draft GitHub release; then run `scripts/publish-binary.sh vX.Y.Z` from a terminal to attach the macOS binary and publish the release. --- ## [0.19.0](v0.18.1...v0.19.0) (2026-10-28) ### Added * a PDF previews as its first page, with its page count ([#167](#167)) ([cb8322d](cb8322d)) * a tab nobody named shows what runs in it, and a space holds nine tabs ([#168](#168)) ([8b9f799](8b9f799)) * an SVG file previews as its picture, and a click in the header shows its source ([#164](#164)) ([9af1131](9af1131)) * review an agent's changes and send it comments on their lines ([#162](#162)) ([626797a](626797a)) ### Fixed * every click target shows the hand, the New space path the text cursor, and a picture goes while a window is open ([#166](#166)) ([e2838bd](e2838bd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.
A PDF previews as its first page, with its page count.
%PDF-previews as its first page, drawn by macOSsipslike the other images that are not PNG, under a caption such as "pdf, page 1 of 12, 612×792, 340 KiB"./MediaBox, so the 50-megapixel guard applies; a page whose size cannot be read is drawn no larger than 2048 pixels. The count comes from the page tree's root and is left out for a file over 4 MiB, of which only the start is read;sipsreads the file itself, so a larger PDF is still shown.sipsdraws a PDF on nothing, so a page of black text was dark on the dark preview: the page is drawn to a JPEG first, whichsipsputs on white.tests/fixtures/previewholds a PNG, JPEG, GIF and SVG of one picture, an SVG without a readable size, a huge SVG, a three-page PDF and a too-large PDF page, with what each should show; a test loads them.Closes #33
Part of #4
🤖 Generated with Claude Code