Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentAllLines lost when new page added #1599

Open
abrahammie opened this issue Feb 18, 2025 · 0 comments
Open

indentAllLines lost when new page added #1599

abrahammie opened this issue Feb 18, 2025 · 0 comments

Comments

@abrahammie
Copy link

Bug Report

Description of the problem

When text indented with indentAllLines wraps to a new page the indent is lost.

Code sample

const pdfkit = require('pdfkit');
const { createWriteStream } = require('fs');
const doc = new pdfkit();
doc.pipe(createWriteStream('out.pdf'));
doc.y = 660;
doc.text(
  'Lorem ipsum odor amet, consectetuer adipiscing elit. Metus est cubilia elit nulla vestibulum viverra vel. Blandit lobortis pulvinar dis pretium sem suspendisse. Habitasse fringilla dis cras iaculis himenaeos. Vitae habitasse tristique id torquent nascetur senectus pellentesque. Luctus at iaculis hendrerit aliquam posuere cursus. Taciti tristique magna tellus feugiat est justo lacinia amet. Facilisi feugiat lacinia hac fermentum porta nascetur parturient? Hendrerit inceptos volutpat sed ac tortor ipsum auctor tempor.',
  { indent: 50, indentAllLines: true },
);
doc.end();

Image

Your environment

  • pdfkit version: 0.16.0
  • Node version: 20.12.2
  • Operating System: mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant