Configuration object
A JSX element representing the PDF viewer component
Usage with data URL
pdf({
name: 'pdf-viewer',
src: 'data:application/pdf;base64,base64-encoded-pdf-string'
});
Usage with mwFile helper and splitView
const mwFile = await mwFileFromUrl(
ctx,
'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'
);
const splitData = await showUI(
ctx,
splitView(
{title: 'Document Viewer'},
[
pdf({
name: 'pdf',
src: mwFile.base64()
})
],
[
// Other UI components
]
)
);
Creates a PDF viewer component for displaying PDF files.