Add page-by-page preview in the GUI after building #18

Closed
opened 2026-03-17 14:08:44 +01:00 by shahondin1624 · 0 comments

Description

After building a songbook PDF, users have no way to preview the result within the application. They must open the PDF externally to check the layout. This makes the edit-build-review cycle slow and cumbersome.

Add a page-by-page preview panel to the GUI that shows a visual representation of each page after a successful build. This gives users immediate feedback on layout, overflow issues, and page arrangement before they open the final PDF.

Acceptance Criteria

  • After a successful build, a preview panel appears in the GUI showing the generated pages
  • Users can navigate between pages (previous/next buttons or similar navigation)
  • The current page number and total page count are displayed (e.g., "Page 3 / 42")
  • The preview renders the actual generated PDF pages as images (using a PDF-to-image approach)
  • The preview panel can be closed/hidden to return to the normal build view
  • The preview updates automatically when a new build completes
  • The GUI remains responsive while the preview is loading (async rendering)

Implementation Hints

  • After a successful build, the PDF file path is already known. Use a PDF rendering library (e.g., Apache PDFBox's PDFRenderer) to convert pages to images
  • Add PDFBox as a dependency to the gui module for PDF-to-image conversion
  • Display pages in a Compose Image composable with navigation controls
  • Consider lazy-loading pages (render on demand as user navigates) for performance with large songbooks
  • The preview could be a new section below the status area, or a separate window/dialog
## Description After building a songbook PDF, users have no way to preview the result within the application. They must open the PDF externally to check the layout. This makes the edit-build-review cycle slow and cumbersome. Add a page-by-page preview panel to the GUI that shows a visual representation of each page after a successful build. This gives users immediate feedback on layout, overflow issues, and page arrangement before they open the final PDF. ## Acceptance Criteria - [ ] After a successful build, a preview panel appears in the GUI showing the generated pages - [ ] Users can navigate between pages (previous/next buttons or similar navigation) - [ ] The current page number and total page count are displayed (e.g., "Page 3 / 42") - [ ] The preview renders the actual generated PDF pages as images (using a PDF-to-image approach) - [ ] The preview panel can be closed/hidden to return to the normal build view - [ ] The preview updates automatically when a new build completes - [ ] The GUI remains responsive while the preview is loading (async rendering) ## Implementation Hints - After a successful build, the PDF file path is already known. Use a PDF rendering library (e.g., Apache PDFBox's `PDFRenderer`) to convert pages to images - Add PDFBox as a dependency to the `gui` module for PDF-to-image conversion - Display pages in a Compose `Image` composable with navigation controls - Consider lazy-loading pages (render on demand as user navigates) for performance with large songbooks - The preview could be a new section below the status area, or a separate window/dialog
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#18