Comments (8)
I'm working on better support for col and rowspans, in the meantime this is quite complicated. I think it would be possible to not override any rows by keeping track of the y pos that gets sent to the renderCell function and increase it sufficiently before drawing anything. I will look into this hopefully later today or this weekend if you have not solved it.
I have actually never used row- or colspan in a project, can you post what your data looks like so that I better can understand your use case?
from jspdf-autotable.
Hi Simon, thanks for your quick response. This is an abstract of my data. In some cases I have 60 objects and I need the sub headers to visualise groups of data, otherwise the readability isn't good.
In the meantime, do you think is a good idea to add a new object for each sub header that I want to add so then that will be replaced with the correct colspan format?
Thanks in advance for your help.
var data = [
{title: "Fecha de creación", organization0: "2015-06-18", organization1: "2015-06-18"},
{title: "Provincia", organization0: "Pichincha", organization1: "Imbabura"},
{title: "Cantón", organization0: "Alausí", organization1: "Archidona"},
{title: "Parroquia", organization0: "Achupallas", organization1: "Abdón Calderón"},
{title: "Sector/es", organization0: "La Independencia", organization1: "La Independencia"},
{title: "Nombre del grupo", organization0: "La lucha de los pobres", organization1: "Alternativas de desarrollo"},
{title: "Representante", organization0: "Juan Guillén", organization1: "Juan Guillén"},
// ADD SUB HEADER WITHOUT REPLACING A ROW
{title: "Conocimientos de los pri...ales de la agroecología", organization0: 6, organization1: 9},
{title: "Decisión política", organization0: 4, organization1: 6},
{title: "Diseño de finca", organization0: 8, organization1: 8},
{title: "Capacidades técnicas", organization0: 1, organization1: 6}
];
from jspdf-autotable.
Yes it sounds like a good idea to add extra objects for now. Is it something like this you want to accomplish with the subheader?
from jspdf-autotable.
Hi Simon, yes that's what I needed and I solved it adding a new object for each sub header. I reported another issue https://github.com/someatoms/jsPDF-AutoTable/issues/44 where you can see the screeshot. However the problem on that issue is about linebreak but still not able to solve it. Hope you can help me with that one.
Thanks in advance for your help
from jspdf-autotable.
Thank you for this plugin! I am having an issue where the pageBreak : 'avoid' option doesn't work. The following two tables comes up in two separate pages, I want to have it in the same page one after the other.
I am sure, I am missing something. Any help would be much appreciated.
pdf.autoTable(descTitle, descData, {
startY: 30,
pageBreak:'avoid'
});
pdf.autoTable(titles, data, {
startY: 150,
pageBreak:'avoid'
});
pdf.save("Report.pdf");
from jspdf-autotable.
If you want the tables on the same page you should use pagebreak: 'auto'. This is the default value however. That doesn't work either?
from jspdf-autotable.
Thank you very much for the prompt reply Simon. Yes, it is working. sorry, I did not try that option before trying. It is a great plugin and I am sure many people would find it useful!
from jspdf-autotable.
No worries and thanks!
from jspdf-autotable.
Related Issues (20)
- (0 , import_jspdf_autotable.default) is not a function HOT 9
- Textfield Signature?
- 表格项合并时表格项与表头信息不对应 HOT 2
- Multitable loop doesn't align properly and creates unusual gaps or overlaps each other HOT 11
- HorizontalPageBreak page break can continue on same page if vertical space is enough HOT 6
- Cannot Read html tags HOT 1
- Merge Cell Inside the body of the table HOT 1
- Parsing HTML with tables HOT 1
- Rowspan on heading HOT 1
- Inconsistent Table Width Across Pages When Exporting Using jsPDF-AutoTable HOT 4
- Table Border is off and value is not displayed when the first column is having large rowSpan. HOT 7
- Some columns are shrinked because of large texts in some columns HOT 2
- I wanted to highlight some part of text in cell text. HOT 1
- How to set specific startY even after page break HOT 1
- Autotable heading or subheading HOT 1
- Text with horizontal spaces are going out of cell boundry or text is hidden under the next column. HOT 1
- Node.js PDF Rendering Issue with HTML Table String from MongoDB HOT 1
- Uncaught TypeError: Cannot set properties of undefined (setting 'pageNumber') at Table2 HOT 2
- There is console.log in cssParser HOT 3
- halign on column headers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jspdf-autotable.