You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating PDF documents with pdfkit, I've noticed that URLs spanning multiple lines are not rendered as clickable links, whereas URLs that fit on a single line are correctly rendered as clickable. This inconsistency affects the usability of the documents, especially when long URLs are necessary. Single-line URLs work as expected.
const PDFDocument = require('pdfkit');
const fs = require('fs');
const doc = new PDFDocument();
doc.pipe(fs.createWriteStream('output.pdf'));
// Example of a multiline URL
doc.text('For more information, visit https://example.com/this-is-a-very-long-url-that-should-be-split-across-multiple-lines-but-still-be-clickable-in-the-generated-pdf', {
link: 'https://example.com/this-is-a-very-long-url-that-should-be-split-across-multiple-lines-but-still-be-clickable-in-the-generated-pdf',
underline: true
});
doc.end();
Your environment
pdfkit version: 0.14.0
Node version: 20.11.0
Browser version (if applicable): Chrome
Operating System: MacOS
The text was updated successfully, but these errors were encountered:
Bug Report
Description of the problem
When generating PDF documents with pdfkit, I've noticed that URLs spanning multiple lines are not rendered as clickable links, whereas URLs that fit on a single line are correctly rendered as clickable. This inconsistency affects the usability of the documents, especially when long URLs are necessary. Single-line URLs work as expected.
Your environment
The text was updated successfully, but these errors were encountered: