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

Bottom border merges with the next line contents. #27

Open
DineshKumar-G opened this issue Jun 16, 2019 · 2 comments
Open

Bottom border merges with the next line contents. #27

DineshKumar-G opened this issue Jun 16, 2019 · 2 comments

Comments

@DineshKumar-G
Copy link

Screenshot_2019-06-16_10-23-25

@atipezda
Copy link

atipezda commented Sep 6, 2019

Code ? @DineshKumar-G

@karl-roberts
Copy link

karl-roberts commented Mar 4, 2020

I have the same issue here. Here's my code that generates this:

  let Pdf = new PdfDocument({
      autoFirstPage: false,
      layout: 'portrait',
      size: 'A4',
      info: {
        Title: 'UID Freight Report'
      }
    })

    let Table = new PdfTable(Pdf, {
      topMargin: 0
    })

    Table
      .addPlugin(new (PdfColumn)({
        column: 'description'
      }))
      .addPlugin(new (PdfColumn)({
        column: 'reference'
      }))
      .setColumnsDefaults({
        headerBorder: 'B'
      })
      .addColumns([{
        id: 'reference',
        header: 'Reference',
        align: 'left',
        width: 100
      }, {
        id: 'description',
        header: 'Description',
        width: 200
      }, {
        id: 'locationName',
        header: 'Location',
        width: 50
      }])
      .onPageAdded((tb) => {
        tb.addHeader()
      })

    Pdf.addPage()

    let filter = request.input('filter', null)

    if (filter) {
      filter = JSON.parse(decodeURIComponent(filter))

      let results = await SearchService.SearchLogs(filter, null, [], null, null, null, null)

      Table.addBody(results.data)
    }

    response.type('application/pdf')
    response.implicitEnd = false
    Pdf.end()
    Pdf.pipe(response.response)

This is part of an AdonisJS controller action

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

3 participants