Repository navigation
fix(deps): update dependency pdfkit to ^0.21.0 - #358
Open
mxdcodes-bot[bot] wants to merge 1 commit into
Open
mxdcodes-bot[bot] wants to merge 1 commit into
mxdcodes-bot[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.20.0→^0.21.0Release Notes
foliojs/pdfkit (pdfkit)
v0.21.0Compare Source
headerRowstable option, which repeats the first rows at the top of each new page. Fixes #1657scaleDownoption todoc.image(), which works likefitbut keeps an image smaller than the rectangle at its own size instead of enlarging it. Fixes #1347/and a non-breaking hyphen as a double space. They now use the no-break space and the hyphen. Fixes #1071, fixes #1040decorationThicknessandunderlineOffsettext options. Fixes #993doc.addPageLabel(), which sets the page labels viewers show, such as roman numerals for a preface or numbering that starts at 49. Fixes #1269startoption todoc.list(), so anumberedorletteredlist can carry on counting after other content. Fixes #1350PAGE_SIZES. Fixes #1236doc.text()adding pages until it runs out of memory when the line width is negative, which happens whenindentwithindentAllLinesis larger thanwidth, or the gaps take up more than the width shared by thecolumns. Such text is now drawn one character per line, as it already was for a line too narrow to hold a characterflipHandflipVoptions todoc.image(), which mirror an image without embedding it a second time. Fixes #1309wordSpacingremoving consecutive line breaks:text()andboundsOfString()collapsed every run of whitespace to one space, soTest\n\nTextwas drawn as the single lineTest Text. Only runs of whitespace within a line are collapsed now. Fixes #1034heightOfStringdrawing the measured text into the page when it is called after atextcall withcontinued: true, because it measured with the line wrapper that call had left behind, which draws its lines. A measurement that passescontinued: trueitself still uses that wrapper and draws as before. Fixes #1284goTorectangle of text drawn with abaselineother than the default sitting an ascent too low, because they were placed from the top of the line while the glyphs had moved up with the baseline. Fixes #994, #1245localeCompareinstead of by their bytes: with destinations namedappendixandChapter1,Chapter1was written second and could not be found. The keys of theEmbeddedFilesandJavaScriptname trees are sorted the same waywidthOfString(), line wrapping and text positioning with theSymbolandZapfDingbatsstandard fonts, which measured many characters as 0 wide (for example theZapfDingbatseuro sign, theSymbolletters and most of theZapfDingbatsornaments) because the text was looked up in the Roman character table instead of the font's own built-in encoding, and the metrics of nearly all of their glyphs were not included. Fixes #5800x10, which was written into the hex string of the text as a single digit, so the following digits paired up wrongly: a\rbefore a line break showed asÐ, andTab\therewas read back asTab–†W&P. Fixes #1425, #606doc.table()parsing a font passed as binary data (e.g. registered withregisterFont(name, uint8Array)) again for every cell, when it restores the font after measuring and drawing the cell, which made tables with such fonts slower. A font loaded from the sameUint8Arrayis now reused without parsing it againlineBreak: 'whitespace'todoc.text(), which breaks a line only at whitespace, a soft hyphen or a zero-width space. The Unicode line breaking rules the wrapper follows also allow a break after a hyphen or a slash, sodesign-systemorhttps://github.com/foliojs/pdfkitcould be cut at a line end, and a text extractor that joins the lines, such as a résumé parser, reads two wordsobjectStreamsoption, which packs the objects that are not streams into compressed object streams and writes a cross-reference stream instead of the xref table, making documents with many such objects, e.g. tagged ones, much smaller. It requires apdfVersionof1.5or higher, and cannot be used with encryption or PDF/A-1. Fixes #1810align: 'center'sitting left of the middle of the line whencharacterSpacingorwordSpacingis set, and withalign: 'right'running past the right edge by thewordSpacingof each gap between wordsboundsOfString()withlineBreak: falseleaving outwordSpacing, so its width now matches the rendered text and its underlineboundsOfString()with awidth, countingcharacterSpacingandwordSpacingtwice, so they no longer run past the text and match the same text drawn withlineBreak: falseCannot find module '#standard-fonts/Helvetica'on the first document from an ESM bundle andInvalid URLwhile importing a CommonJS one, because the standard font metrics and the PDF/A ICC profile were resolved relative to pdfkit's own package directory at import time. Both are now resolved on first use, a standard font that cannot be loaded names itself and the fix in its error, andregisterStdFontsis exported from the Node build as it already was from the browser build, so a bundle can register the fonts it uses frompdfkit/standard-fonts/<Name>. The Node build now requires the standard fonts by a path relative to the built file, which replaces the#standard-fonts/*import mapping and lets an ESM bundle load them from a copy ofjs/standard-fontsnext to it. Fixes #1801doc.list()drawing the label of anumberedorlettereditem with the line wrapper's own options object, which threwunsupported number: NaNforaligncenterandright, applied a word spacing derived from the previous line to the label foralignjustify, and sized the underline, strike, link and goTo of every label after the first from the previous item's texthiddenoption to form annotation methods, for a field that should start hidden (e.g. one an interactive action reveals later) instead of the usual default of visible and printabledoc.rotate()marking the wrong area, because_convertRectderived each corner's y from the already transformed x and mapped only two of the four corners, so the rectangle a viewer makes interactive did not follow the rotated content. Fixes #1153onClick,onMouseDown,onMouseEnter,onMouseExit,onFocusandonBluroptions to form annotation methods, for the JavaScript a field runs on each of those events. Each accepts a string or a plain function, whose source text is written into the actionembedFontsoption toinitForm, embedding a complete, character-addressable copy of each custom font used in a form field. Viewers that regenerate a field's appearance from its value, such as Adobe Acrobat/Reader, need one to resolve field text; without it they fall back to a substitute font. It adds roughly the size of the font file per font, so it is off by default. Fixes #1096alternateNameandstructParentoptions to form annotations so tagged form widgets can have an accessible name and belong to aFormstructure element. Retain the annotation's page when its structure is finalized after a page change. Honor an explicitfontSizewhen the field uses the default form font. Fixes #1803Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.