Questions tagged [jspdf-autotable]

AutoTable is an extension for the popular jsPDF library which adds useful functionality for exporting tables in PDF format

See the source code and examples on GitHub

376 questions
22
votes
4 answers

Different width for each columns in jspdf autotable?

My table has 13 columns. How can I get different width for each column? Can I give each column width like this? styles: {overflow: 'linebreak' ,columnWidth: [100,80,80,70,80,80,70,70,70,70,60,80,100]}, My table Syntax: > var res =…
Abdu Rahiman
  • 1,349
  • 2
  • 9
  • 10
12
votes
1 answer

How to make a multiple table header

I am trying to make a table with 2 headers merged. At the moment i made 2 seperate tables with 2 seperate headers and it looks okay, but when the table width expands the first table header does not expand. How can i merge the 2 headers or can i make…
akshay bhoendie
  • 273
  • 3
  • 10
11
votes
2 answers

jspdf - Insert text after table

I am using jsPDF and jsPDF-AutoTable to create and print a report. But I want to insert a text right below the table. But, as it is a dynamic table, I can't tell doc.text() the y coordinate from where to write the text. Has anyone done that before?…
Andy Torres
  • 165
  • 1
  • 1
  • 11
11
votes
4 answers

How can i make a specific row bold?

I am working on generating a pdf and till now its going fine, but i want some specific rows to be bold. for example see picture : grid template from jspdf-autotable How can i make for example, row with id =1 and id=3 bold? Below my code. function…
akshay bhoendie
  • 273
  • 3
  • 10
9
votes
7 answers

jsPDF AutoTable - autoTable is not a function

I'm using JSPdf on an Angular app, and I'm attempting to use the JS autotable plugin but I'm running into the JS error EXCEPTION: Uncaught (in promise): TypeError: doc.autoTable is not a function TypeError: doc.autoTable is not a function I have…
Stu Furlong
  • 3,490
  • 5
  • 34
  • 47
9
votes
3 answers

jsPDF auto table wide column content not breaking

I'm using jsPDF Auto Table to grab html content from a table and display in jsPDF document for exporting, but no matter what I try, seem unable to get the column width's breaking/ wrapping as i'd like. Ideally would like the table and columns to…
Wiggy
  • 158
  • 1
  • 1
  • 11
9
votes
2 answers

How can I style last row using jsPDF Autotable plugin?

I create a PDF document based on a table using jsPDF and AutoTable: var doc = new jsPDF('p', 'pt'); //columns and rows are arrays created from the table content doc.autoTable(columns, rows, { drawRow: function (row) { …
Droidman
  • 11,485
  • 17
  • 93
  • 141
8
votes
2 answers

issue while using JsPdf AutoTable setting newline on 'd' and other characters

I' using jsPDF with AutoTable in my WebSite, and there is an issue when i'm exporting my Table to PDF. When the PDF contains 'd' letter in the string in a column, after the 'd' jsPDF will set a newline by breaking a word and by making the PDF…
NiceToMytyuk
  • 3,644
  • 3
  • 39
  • 100
7
votes
2 answers

jsPDF autotable right align x position bug

My example (just click "export PDF"): https://jsfiddle.net/j9vaqpnz/7/ My example exports my table which looks like this: . The table then is exported to pdf using libraries jspdf and autotable. During the export function I use the "drawCell"…
DavidDunham
  • 1,245
  • 1
  • 22
  • 44
7
votes
4 answers

Custom font faces for jspdf-autotable plugin

Can someone help with an example for setting custom fonts for jspdf-autotable I tried the following var doc = new jsPDF('p', 'pt'); doc.setFont("rotobo"); ----> font face name that I declared in my css file doc.autoTable(columns,…
naresh setty
  • 71
  • 1
  • 1
  • 2
6
votes
2 answers

How do I make a jspdf autotable landscape?

The table plugin JsPDF-AutoTable: https://github.com/simonbengtsson/jsPDF-AutoTable how do I make the page landscape as oppose to portrait? In the documentation it just says "Only pt supported (not mm or in)". I don't understand how to make the page…
user1190132
  • 515
  • 4
  • 18
6
votes
11 answers

how to use jsPDF and jspdf-autotable in angular 5

I am trying to use jsPDF and jspdf-autotable in my Angular 5.2.0 project. My package.json is below (related parts): "dependencies": { ... "jspdf": "^1.3.5", "jspdf-autotable": "^2.3.2" ... } My angular-cli.json is below (related…
RIDVAN TANIK
  • 71
  • 1
  • 1
  • 6
6
votes
1 answer

How to add a logo to the top of each page using JsPDF-autoTable?

JsPdf-autoTable is a fantastic piece of software and very simple to get the basics working. Now I want to add a logo and some text at the top of each page and a page X of Y footer on each page, but I can't figure out how. I want to get the image for…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
6
votes
1 answer

How to fit a wide table using jspdf, jspdf-autotable

I'm using jspdf with the plugin jspdf-autotable to create a pdf for a very wide table, is there a way to auto fit the table/column data to any page size? I tried the code below with overflow: 'linebreak' but it breaks the words halfway not at the…
A E
  • 73
  • 1
  • 3
  • 7
5
votes
2 answers

How to get the finalY of lastAutoTable in jspdf-autoTable

I am using angular 9.I have a requirement to convert a html table with some content above and below the table into pdf. I am using jspdf-autotable.I followed the examples in the link…
aish.a
  • 176
  • 1
  • 7
1
2 3
25 26