
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@pardnchiu/pdf2image
Advanced tools
pdf2image is a lightweight JavaScript library to convert PDF pages into images (PNG, JPG, WebP) with real-time progress tracking and optional ZIP compression.
jpg
, png
, webp
for versatile usage.npm i @pardnchiu/pdf2image
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/pdf2image@[VERSION]/dist/pdf2image.js"></script>
import { pdf2image } from "https://cdn.jsdelivr.net/npm/@pardnchiu/pdf2image@[VERSION]/dist/pdf2image.esm.js";
pdf2image
const converter = new pdf2image({
filename: "image-yyyy-MM-DD_hh:mm", // Specify output filename, supports date format templates [yyyy|MM|DD|hh|mm]
file: [file], // Input PDF file from file input or other sources
scale: 1.5, // Scale factor, default is 1.5
type: "png" // Output image format [jpg|png|webp]
});
// Convert PDF to images
converter.convert().then(images => {
console.log("Successfully converted images:", images);
});
// Download compressed ZIP file
converter.download().then(() => {
console.log("Images have been packed and downloaded!");
});
This source code project is licensed under the MIT License.
©️ 2024 邱敬幃 Pardn Chiu
FAQs
pdf2image is a lightweight JavaScript library to convert PDF pages into images (PNG, JPG, WebP) with real-time progress tracking and optional ZIP compression.
We found that @pardnchiu/pdf2image demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.