Create and modify PDF documents in any JavaScript environment
MIT License
Bot releases are hidden (Show)
Published by Hopding over 4 years ago
png-ts
to @pdf-lib/upng
to support all PNG formats:
Published by Hopding almost 5 years ago
decodePDFRawStream
:
addDefaultPage
is set to true
:
Published by Hopding almost 5 years ago
PDFDocument.setLanguage
method to set the document's language metadata (thanks @Mogztter):
const enum
to support TypeScript projects using the --isolatedModules
flag:
Published by Hopding about 5 years ago
Resources
when normalizing pages:
Published by Hopding about 5 years ago
PDFPage.drawSvgPath(...)
method (thanks @jlmessenger!):
Published by Hopding about 5 years ago
PDFPage.drawLine(...)
method (Thanks @samezyane!):
PDFPage.drawText(...)
with maxWidth
and wordBreaks
options (Thanks @multiplegeorges, @GerardSmit, and @vicary!):
Published by Hopding about 5 years ago
PDFDocument.getPageCount()
to return undefined
:
Published by Hopding about 5 years ago
This release is a complete rewrite of pdf-lib
.
This rewrite was extensive, touching every part of the library. Here is a high-level overview of the changes and improvements:
Published by Hopding over 5 years ago
Parent
entries.
stream
keyword EOLs.
Published by Hopding over 5 years ago
Published by Hopding over 5 years ago
sizeOfFontAtHeight
methods to font factories.
PDFString
serialization (remove incorrect escapes).
Published by Hopding over 5 years ago
maxObjectNumber
when parsing certain object streams.
Published by Hopding almost 6 years ago
PDFDocument.embedFont
is now deprecated. Please use PDFDocument.embedNonstandardFont
instead.drawText()
or drawLinesOfText()
operators, for example), please be sure to use the font.encodeText()
method for the font you are using. This is highly recommended for both standard and nonstandard fonts (and is required if you want to use characters outside the ascii range).font.widthOfTextAtSize()
and font.heightOfFontAtSize()
methods to measure text, as well as usage of the font.encodeText()
method to encode characters outside the ascii range.
Published by Hopding almost 6 years ago
Published by Hopding almost 6 years ago
Published by Hopding about 6 years ago
PDFDocumentWriter.saveToBytes(pdfDoc)
, but they can be turned off with PDFDocumentWriter.saveToBytes(pdfDoc, { useObjectStreams: false })
.
drawEllipse
, drawCircle
, drawImage
, drawRectangle
, drawSquare
, drawText
, and drawLinesOfText
operators.
Published by Hopding over 6 years ago
endstream
keyword.
PDFDocumentFactory.load()
method to ensure users pass it a Uint8Array
(instead of, say, a Blob
)
Published by Hopding over 6 years ago
es
folder).dist/pdf-lib.js
).dist/pdf-lib.min.js
).pdf-lib/x/y/z
is no longer valid.pdf-lib/lib/x/y/z
is the CommonJS module.pdf-lib/es/x/y/z
is the ES6 module.pdf-lib
now directly exports all public classes and functions. For example: // v0.1.0
import { PDFDocumentWriter, PDFDocumentFactory } from 'pdf-lib/core/pdf-document';
import { drawText } from 'pdf-lib/helpers/pdf-operators/composite';
// Now
import {
PDFDocumentWriter,
PDFDocumentFactory,
drawText,
} from 'pdf-lib';