Skip to content

table cell alignment - jspdf.plugin.cell #436

@mryellow

Description

@mryellow

I believe this differs from #273 which is about fromHTML.

Using a header config such as this:

var head = [
    {
        name: 'field1',
        prompt: 'Field 1',
        width: 150
    },
    {
        name: 'field2',
        prompt: 'Field 2',
        width: 150,
        align: 'right'
    }
];
doc.table(10, 10, data, head, {
    autoSize: false,
    printHeaders: true
});

Currently this line passes header.align from table to cell.

https://github.com/MrRio/jsPDF/blob/f3f626150c4fe7f244a3bc3e580a0c97ac85ad72/jspdf.plugin.cell.js#L317

However this section refactors the input and headerNames[j] is at the end of the day an array of strings, not an array of objects.

https://github.com/MrRio/jsPDF/blob/f3f626150c4fe7f244a3bc3e580a0c97ac85ad72/jspdf.plugin.cell.js#L248

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions