jatui

PDFViewer

Page-by-page PDF renderer with navigation controls

No-backend graceful state

PDFViewer fetches /api/files/{fileId}/pdf-info on mount. Without a backend it shows an inline error — this is the expected no-backend state.

Loading PDF…

Integration notes

  • GET /api/files/{fileId}/pdf-info{ pageCount: number }
  • GET /api/files/{fileId}/pdf-page/{n}?scale=2 → PNG image blob
  • Server-side PDF rendering via pdf2pic or similar

Props

PropTypeDefaultDescription
fileIdstringID used to construct API URLs
fileNamestring'document.pdf'Display name / alt text
classstring''Additional CSS classes on root