Node.js PDF 라이브러리 비교 (무료 및 유료 도구)
이럴 때 Node.js용 PDF 라이브러리가 유용하게 사용됩니다. 이러한 라이브러리를 사용하면 개발자는 PDF를 프로그래밍 방식으로 생성, 편집, 병합 및 변환할 수 있습니다.
더 읽기
Node.js PDF 라이브러리
import {PdfDocument} from "@ironsoftware/ironpdf";
(async () => {
// Create a PDF from an HTML string
const pdf = await PdfDocument.fromHtml("<h1>Hello World</h1>");
// Export the PDF to a file
await pdf.saveAs("output.pdf");
// Advanced Example with HTML Assets
// Load external HTML assets: Images, CSS, and JavaScript.
const htmlContentWithAssets = "<img src='icons/iron.png'>";
const advancedPdf = await PdfDocument.fromHtml(htmlContentWithAssets);
// Save the PDF with loaded assets
await advancedPdf.saveAs("html-with-assets.pdf");
})();import {PdfDocument} from "@ironsoftware/ironpdf";
(async () => {
// Create a PDF from an HTML string
const pdf = await PdfDocument.fromHtml("<h1>Hello World</h1>");
// Export the PDF to a file
await pdf.saveAs("output.pdf");
// Advanced Example with HTML Assets
// Load external HTML assets: Images, CSS, and JavaScript.
const htmlContentWithAssets = "<img src='icons/iron.png'>";
const advancedPdf = await PdfDocument.fromHtml(htmlContentWithAssets);
// Save the PDF with loaded assets
await advancedPdf.saveAs("html-with-assets.pdf");
})();PDF 파일을 HTML처럼 빠르게 변환해야 할 때.