Skip to content

Overview

The pdf-uploader component can load a PDF document into a pdf-document component. The pdf-uploader does this in one of two ways:

  • if the user clicks in the <pdf-uploader> area, a file selection dialog appears; the selected file is loaded.
  • otherwise, when the user drags and drops a file into the <pdf-uploader> area, the dropped file is loaded.

The pdf-uploader component accepts a document property which identifies the particular <pdf-document> element into which the file will be loaded. If no document property is supplied, a value of "default" will be assumed.

Usage

Sample usage:

html
<pdf-document />
<pdf-uploader />

In this case, the <pdf-document> element's name is assumed to be "default", and the <pdf-uploader> element's document property is also assumed to be "default".

Properties

PropertyAttributeDescriptionTypeDefault
documentdocumentReference to the pdf-document component, into which this component will upload documents.string | undefined'default'
pagesviewerpagesviewerIdentifies the PdfPages component by its 'name' property.string | undefined'default'

Built with StencilJS