Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Colspan and Rowspan in tables |
Post Reply ![]() |
Author | |
chris_adsi ![]() Team Player ![]() Joined: 19 May 21 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() Posted: 17 May 22 at 4:53PM |
I need to produce a document with some repeated sections where the information is presented in a table. Ideally I need to be able to emulate colspan so I can have a couple of rows that cut across all columns.
I don't think this is possible is it using the standard table functionality? Can I emulate it by placing 2 tables right on top of each other, or some other way? The content is truly dynamic so drawing lines etc could get very tricky! I can see that colspan and rowspan would come in very handy, so if there are techniques to emulate this that would be great.
Thanks |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Chris,
without detailed understanding what you mean: Perhaps thinking about inserting html-table-code could be an idea? Here's a sample: https://www.debenu.com/kb/insert-table-pdf/ Cheers, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
chris_adsi ![]() Team Player ![]() Joined: 19 May 21 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
What I need to do is have a table where the top tow rows span across all columns, and then all following rows have 2, 3, or more columnns - i.e.
C C CCC CCC CCC Where the top two span the shole width
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
and this you can do with the used html-code and the sample i've sent. If you're not familiar with this: https://www.tablesgenerator.com/html_tables |
|
Cheers,
Ingo |
|
![]() |
|
chris_adsi ![]() Team Player ![]() Joined: 19 May 21 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Hi - I am very familiar with how to do colspan and row span in HTML, just not how to implement the same in QuickPDF.
When I draw a table I use CreateTable and specify the columns and rows. When I use SetTableCellContent I have to specify an actual column and row number, so effectively targetting a single cell? When I use DrawTableRows it takes first row and last row as an argument. I can't quite fathom out how I can merge cells across a row, or down a column? |
|
![]() |
|
kevinqpl ![]() Beginner ![]() Joined: 19 May 22 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Hi Chris,
I think the MergeTableCells function will be exactly what you're looking for.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Kevin,
thanks for being here. Cheers and welcome, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
chris_adsi ![]() Team Player ![]() Joined: 19 May 21 Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Ah perfect - thanks for that - had missed that function completely!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store