Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 6, 2026

This PR contains the following updates:

Package Change Age Confidence
@react-pdf/pdfkit (source) 4.0.44.1.0 age confidence

Release Notes

diegomura/react-pdf (@​react-pdf/pdfkit)

v4.1.0

Compare Source

Minor Changes
  • #​3188 f034491b Thanks @​carlobeltrame! - Fix and rework the hyphenation algorithm, and allow custom word hyphenation algorithms to specify whether a hyphen should be inserted in case the word is wrapped.

    Caution: If you have been using a custom hyphenation callback - which hasn't been working properly since at least version 2.0.21 - then you will need to change your implementation to leave a soft hyphen character ('\u00AD') at the end of syllables where you want react-pdf to insert a hyphen when wrapping lines. Syllables without a final soft hyphen character will still be able to break, but will not produce a hyphen character at the end of the line.

    This allows you to break correctly on normal hyphens or other special characters in your text. For example, to use the default english-language syllable breaking built into react-pdf, but also break after hyphens naturally occurring in your text (such as is often present in hyperlinks), you could use the following hyphenation callback:

    import { Font } from "@​react-pdf/renderer";
    
    Font.registerHyphenationCallback((word, originalHyphenationCallback) => {
      return originalHyphenationCallback(word).flatMap((w) => w.split(/(?<=-)/));
    });

    (flatMap requires at least ES2019)


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the renovate label Jan 6, 2026
@renovate renovate bot force-pushed the renovate/react-pdf-pdfkit-4.x branch from 635c158 to 89dfc18 Compare January 6, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant