Skip to content

🖌️ Add image-only browsing gallery for PDF documents - #213

Open
JFWooten4 wants to merge 2 commits into
mainfrom
feature/document-image-gallery-20261023
Open

JFWooten4 wants to merge 2 commits into
mainfrom
feature/document-image-gallery-20261023

Conversation

@JFWooten4

@JFWooten4 JFWooten4 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds Browse document images to the PDF viewer’s Tools menu.
  • Finds embedded raster images on demand using PDF.js image coordinates, skipping full-page scan backgrounds and tiny decorative images.
  • Displays a natural-color image viewer with previous/next arrows, keyboard navigation, page references, and a thumbnail strip.
  • Includes a Go to page action to navigate back to the original document.
  • Scans progressively and yields to the browser so large PDFs can begin showing results before the scan completes; pauses scanning when closed.

Validation

  • Added unit coverage for image bounds, rotated/clipped corners, scan-background exclusions, and thumbnail crop coordinates (tests/image-gallery.test.mjs).
  • GitHub Actions Build extension passed on the latest branch commit, including npm tests, the extension build, and the packaging check. Visual browser verification is still recommended.

Notes

  • The gallery works with raster images recognized by PDF.js; vector-only diagrams are not separate embedded image objects.
  • Gallery rendering uses cropped PDF canvases rather than exporting the original compressed image bytes.

JFWooten4 and others added 2 commits October 23, 2026 04:50
Scan embedded images on demand, browse with thumbnails and keyboard navigation, and jump to each image's source page. Exclude page-sized scan backgrounds and retain natural image colors.

Co-authored-by: Codex Web <noreply@openai.com>
Include the new image gallery unit tests in npm test, which runs as part of the build workflow.

Co-authored-by: Codex Web <noreply@openai.com>
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