Export Pdf with pagination

Export Pdf with pagination

aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

Hello
I need export file to pdf and put each page pagination
Regards

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @aaiglesias85 ,

    Take a look at this example here, this should get you going in the right direction,

    Cheers,

    Colin

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Thanks Colin
    I need pagination on footer like this

    text: ['page ', { text: page.toString() }, ' of ', { text: pages.toString() }],

    doc['footer']=(function(page, pages) {
    return {
    columns: [
    {
    alignment: 'left',
    fontSize: 10,
    text:item_name
    },
    {
    alignment: 'right',
    fontSize: 10,
    text: ['page ', { text: page.toString() }, ' of ', { text: pages.toString() }],
    },
    ],
    margin: 20
    }

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @aaiglesias85 ,

    Take a look at this thread here - it answers it there. Here's a live example with that code.

    Cheers,

    Colin

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Thanks colin

    Regards

This discussion has been closed.