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

Linebreaks are not recognized in rendered text in a cell #2891

Closed
nimble-123 opened this issue Aug 31, 2020 · 5 comments
Closed

Linebreaks are not recognized in rendered text in a cell #2891

nimble-123 opened this issue Aug 31, 2020 · 5 comments

Comments

@nimble-123
Copy link

nimble-123 commented Aug 31, 2020

Hi,

i want to create a table and have some linebreaks in a cell. But in the rendered pdf document these linebreaks are not recognized anymore.

const aHeaders = [{
	id: "Field",
	name: "Field",
	prompt: "Field",
	width: 65,
	align: "left",
	padding: 0
}, {
	id: "Entry",
	name: "Entry",
	prompt: "Entry",
	width: 150,
	align: "left",
	padding: 0
}];

let aData = [];
aData.push({
	Field: "Field 1",
	Entry: "Title: Sed fermentum, mi et tristique ullamcorper" + "\n" +
		"Priority: high" + "\n" +
		"Description: Sed fermentum, mi et tristique ullamcorper"
});

doc.table(14, 50, aData, aHeaders, {
	fontSize: 10
});

Is this a bug or am i doing something wrong?

Any help would be much appreciated.

@HackbrettXXX
Copy link
Collaborator

You could try setting an array of strings with one entry per line. Not sure if this will work, though.

@nimble-123
Copy link
Author

@HackbrettXXX i tried that but i didn't work.

@HackbrettXXX
Copy link
Collaborator

Then we should probably change it such that it works ;)

@listopadiya
Copy link
Contributor

listopadiya commented Oct 4, 2020

I can check this one, if you don’t mind.
UPD: created PR with a fix.

@github-actions
Copy link

github-actions bot commented Jan 4, 2021

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants