A PDF viewer for Vue using Mozilla's PDF.js
(WIP)
(WIP)
The url of the pdf file. src
may also be a string|TypedArray|DocumentInitParameters|PDFDataRangeTransport
for more details, see PDFJS.getDocument()
.
The page number to display.
The page rotation in degrees, only multiple of 90 are valid.
The scaling factor. By default, the pdf will be scaled to match the page width
with the container width.
When passed value page-width
and / or using resize
prop, will send back the scale
computed accordingly via update:scale
event (use it with scale.sync="scale"
)
Enable Auto Resizing on window resize. By default, autoresizing is disabled.
Show the annotations in the pdf. By default, annotation layer is disabled.
Show the text layer in the pdf. By default, text layer is enabled.
The total number of pages of the pdf.
The provided PDF's loading state
Function handler for errors occurred during loading/drawing PDF source.
Function handler for errors occurred during loading/drawing PDF source. Example:
handle_pdf_link: function (params) {
// Scroll to the appropriate place on our page - the Y component of
// params.destArray * (div height / ???), from the bottom of the page div
var page = document.getElementById(String(params.pageNumber));
page.scrollIntoView();
}
src
: see:src
prop
This function creates a PDFJS loading task that can be used and reused as:src
property.
MIT
arkokoley - https://github.com/arkokoley/pdfvuer