Repository navigation
Conversation
A PDF is a document asset and cannot go in a playlist or over a video. Rendering a page
to a picture files it as an ordinary image child of the PDF, so it can.
- services/pdf_grab.py renders with pypdfium2 (already a dependency) to PNG and catalogues
it through ingest_file with source=pdf_page, parent_asset_id and a new source_page column
(migration b4c7e19a2d58).
- POST /api/assets/{id}/grab-page and GET /api/assets/{id}/pages.
- Assistant: find_pages and read_page look, propose_grab proposes; apply renders only when
the person presses Apply. search_assets names a document hit's page.
- Frontend: a page picker and per-page "Grab as image" on the PDF's Text tab, and a card
for proposed grabs.
- Page pictures are left out of the parent's Clips list.
Cropping to a region is not done: docs/pdf-grabs.md says what is missing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD4QdBtsfb9vwR5W3g2
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.
What
A PDF is a
documentasset, so it can't go in a playlist or over a video in GVC. This renders a page to a picture and files it as an ordinaryimage, which can.services/pdf_grab.py: pypdfium2 (already a dependency) renders a page to PNG, catalogued viaingest_fileassource=pdf_pagewithparent_asset_idand a newsource_pagecolumn.POST /api/assets/{id}/grab-page,GET /api/assets/{id}/pages.find_pages/read_pagelook,propose_grabproposes; the render happens only on Apply.search_assetsnow names a document hit's page.Whole pages only. Cropping to a table is not done;
docs/pdf-grabs.mdsays what is missing.Deployment
b4c7e19a2d58adds nullableasset.source_page(runs on container start; downgrade drops it).docker compose up --build -d(backend and frontend).Tested
pytest -q(1670 passed),npm test(534 passed),npm run build.Generated by Claude Code