API reference
@salmonui/pdf-viewer
37 exported symbols: 1 component, 2 functions, 17 interfaces, 13 types and 4 constants. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/pdf-viewer';Components
Functions
resolveScaleResolves a zoom value to a numeric scale (fit modes measure the reference page against the viewport).stepScaleNext zoom step from scale (direction 1 zooms in, -1 out).
Interfaces
FitContextPdfPageSizePage size in PDF points (1/72 inch), in the displayed orientation.PdfTextMarkupAnnotationA text markup annotation. Coordinates are zoom independent.PdfViewerActionsCommands (actionsRef).PdfViewerAnnotationsChangeEventPdfViewerCancelableEventPdfViewerLinkEventPdfViewerLoadInfoPdfViewerLocaleTextPdfViewerOutlineItemPdfViewerPasswordRequestPdfViewerPropsPdfViewerSearchOptionsPdfViewerSearchResultPdfViewerStateSnapshotPdfViewerToolbarContextPdfViewerToolbarCustomItemA custom toolbar button, or any content through render.
Types
PdfFormValueAcroForm field values by field name: text and choice fields are strings, list boxes string arrays, check boxes booleans, radio groups the selected export value.PdfFormValuesPdfRectA rectangle in PDF user space: [x1, y1, x2, y2], origin at the bottom left of the page.PdfTextMarkupKindPdfViewerEventSourcePdfViewerPartPdfViewerScrollModePdfViewerSidebarPdfViewerSourceA document: a URL (string or URL) or the bytes (ArrayBuffer, Uint8Array, Blob).PdfViewerSpreadMode'odd' starts spreads on odd pages (1-2, 3-4), 'even' on even pages (1, 2-3).PdfViewerToolbarItemBuilt-in ids, custom items, '|' (separator) and '-' (spacer).PdfViewerToolbarItemIdPdfViewerZoomA scale (1 = 100 %) or a fit mode.
Constants
PDF_TO_CSSCSS pixels per PDF point at scale 1.PDF_VIEWER_DEFAULT_LOCALE_TEXTPDF_VIEWER_DEFAULT_TOOLBARZOOM_STEPSZoom steps of the zoom in / out commands and the zoom menu.