
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
pdf-viewer-root
Advanced tools
This library is based on @yangxuy/pdf-reader but has some new features
yarn add pdf-viewer-root
npm i pdf-viewer-root
vue 2 / 3:
<template>
<pdf-viewer-root :url="url" />
</template>
<script>
import "pdf-viewer-root"
</script>
react:
import pdf from "./assets/1.pdf";
import "pdf-viewer-root";
import { useRef } from "react";
import React from "react";
function App() {
const div = useRef<any>();
return (
<div className="App" ref={div}>
{React.createElement("pdf-viewer-root", { url: pdf })}
</div>
);
}
export default App;
| attr | description | default | Type | Not working yet |
|---|---|---|---|---|
| url | Link to the file (you can send a blob) | string | ||
| page | Page number, from 1 to infinity | 1 | number | |
| mode | Display mode if 1 shows by page. If 2 shows all pages at once | 1 | number | |
| scale | pdf size on screen. from 10 to 100 | 100 | number | - |
| dpi | Manages the quality | 300 | number | - |
| onSuccess | When the pdf is loaded, this event will be called | - | (pdf) => {} | |
| onError | When the pdf gives an error, this event will be called | - | (error) => {} | |
| debug | Log info in console | false | boolean | |
| loadingtext | Text in loadingComponent | 'loading' | string |
FAQs
a pdf reader can use for react or vue
We found that pdf-viewer-root demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.