Skip to content

Support PDF file format #3613

@anny320

Description

@anny320
  • adds pdf file type to supporting documents
  • updates documentViewer to support PDFs page select
  • some UI updates. cleans up button placement
  • adds button to view full page from declaration review

Acceptance criteria

GIVEN I am on the supporting documents page
WHEN I click upload button
THEN I can select .pdf type of files

GIVEN I have uploaded a pdf
WHEN I click preview (the name of the file linl)
THEN I open the full page documentViewer

GIVEN I have uploaded a pdf
WHEN I click preview (the name of the file linl)
THEN I open the full page documentViewer and show the page select button

GIVEN I have uploaded a pdf
WHEN I on the declaration preview
THEN I show the page selects in the documentViewer

GIVEN I am previewing a pdf
WHEN I click on the page select
THEN switch to the next page

GIVEN I am on the first page
THEN disable the left arrow page switcher

GIVEN I am on the last page
THEN disable the right arrow page switcher

GIVEN I click the full page Icon button
THEN open the documentViewer in full page.

Design

https://www.figma.com/file/SsqCzO2eherXXCKyixmli9/OpenCRVS-Design-System-v2-WIP?node-id=993%3A12438

Dev tasks

Consult Riku before starting on this.

  • Add PDF support for file uploads by expanding on the list of currently allowed file extensions
  • Build a preview for PDF files
    • Primarily this should be built by using an embedded iframe that renders the PDF (with toolbars etc hidden)
    • Secondarily if this doesn't work, we use a PDF icon and open the PDF in a new tab

Metadata

Metadata

Type

Projects

Status

Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions