Skip to content

Add new feature which is used for Inserting an additional header row after page break#1205

Open
tuanaphan wants to merge 3 commits intobpampuch:masterfrom
phantuan87:insert-additional-header-row
Open

Add new feature which is used for Inserting an additional header row after page break#1205
tuanaphan wants to merge 3 commits intobpampuch:masterfrom
phantuan87:insert-additional-header-row

Conversation

@tuanaphan
Copy link
Copy Markdown

Hi @bpampuch, @liborm85
I implemented this feature for solving issue-531. Could you please have a look at this?
Thank you.

@liborm85
Copy link
Copy Markdown
Collaborator

liborm85 commented Dec 2, 2017

Thanks. I tried render pdf with this docDefinition:

var additionalRowTxt = 'Cont..';
var tableRows = [];
tableRows.push(['h1', 'h2', 'h3']);

for (var i = 0; i < 590; i++) {
	tableRows.push(['a', 'b', 'c']);
}

var dd = {
	content: [
		{
			table: {
 				headerRows: 1,
 				widths: 'auto',
 				body: tableRows,
 				additionalHeaderRow: function(rowIdx) {
 					return {
 						table: {
 							widths: 'auto',
 							body: [
 								[
 									{
 										text: additionalRowTxt,
 										colSpan: 3
 									},
 									{},
									{}
 								]
 							]
 						}
 					};
 				}
 			}
		}
	]
};

And output on second page is with this wrong content:
bug-1205

@tuanaphan
Copy link
Copy Markdown
Author

Hi @liborm85 , thank for your review. I'll investigate that issue asap. This implementation still works well on my project.

@lbelavoir
Copy link
Copy Markdown

@tuanaphan any chance that you fixed your bugs ?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants