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

how to add column spaces #9

Open
Spandana-Gajangi opened this issue Nov 4, 2017 · 6 comments
Open

how to add column spaces #9

Spandana-Gajangi opened this issue Nov 4, 2017 · 6 comments

Comments

@Spandana-Gajangi
Copy link

Spandana-Gajangi commented Nov 4, 2017

How to add column spaces and table is creating right side of thee page. how to align it to left.
.setColumnsDefaults({
align: 'left',
})

@tafel
Copy link
Contributor

tafel commented Nov 4, 2017

Can you describe more precisely your question? Maybe with a print screen or your complete code?
thanks

@Spandana-Gajangi
Copy link
Author

Spandana-Gajangi commented Nov 4, 2017

table
.addPlugin(new TablePlugin({
column: 'invoiceNumber',
align: 'left',
}))
.setColumnsDefaults({
align: 'center',
padding: [0, 5, 5, 5],
})
.addColumns([
{
id: 'invoiceNumber',
header: 'Invoice Number',
align: 55,
},
{
id: 'invoiceAmount',
header: 'Invoice Amount',
width: 65,
},
{
id: 'originalDueDate',
header: 'Original due date',
width: 55,
},
{
id: 'revisedlDueDate',
header: 'Revised due date',
width: 55,
},
{
id: 'daysOfDiscount',
header: '# Days of discount',
width: 50,
},
{
id: 'discountRate',
header: 'Discount rate (%)',
width: 55,
}, {
id: 'cashDiscount',
header: 'Cash discount',
width: 65,
}, {
id: 'netPayableAmount',
header: 'Net payable amount',
width: 65,
},
]);

this is the code I'm using. here i'm adding the output cannot I make it more good. In this column headers and body is not in same line.How to make it start from left side.
debit

@tafel
Copy link
Contributor

tafel commented Nov 16, 2017

major update has been done. Please try with last version. Try playing with paddings to create space.

@pooja143-tech
Copy link

//you can give cell padding to headers too
.setColumnsDefaults({
align: 'center',
padding: [0, 5, 5, 5],
headerPadding: [0, 5, 5, 5],
})

@pooja143-tech
Copy link

//you can give cell padding to headers too
.setColumnsDefaults({
align: 'center',
padding: [0, 5, 5, 5],
headerPadding: [0, 5, 5, 5],
})

//your pdf looks perfect and content will be
in order

@bso-oo
Copy link

bso-oo commented Apr 14, 2021

Do you only know how to give the header background color?

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

4 participants