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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Colspan and Rowspan in tables
  FAQ FAQ  Forum Search   Register Register  Login Login

Colspan and Rowspan in tables

 Post Reply Post Reply
Author
Message
chris_adsi View Drop Down
Team Player
Team Player


Joined: 19 May 21
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris_adsi Quote  Post ReplyReply Direct Link To This Post Topic: Colspan and Rowspan in tables
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3443
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 22 at 10:15PM
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

Back to Top
chris_adsi View Drop Down
Team Player
Team Player


Joined: 19 May 21
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris_adsi Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 22 at 8:34AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3443
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 22 at 10:32AM
Originally posted by chris_adsi chris_adsi wrote:

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


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

Back to Top
chris_adsi View Drop Down
Team Player
Team Player


Joined: 19 May 21
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris_adsi Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 22 at 10:40AM
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? 




Back to Top
kevinqpl View Drop Down
Beginner
Beginner


Joined: 19 May 22
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevinqpl Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 22 at 7:33PM
Hi Chris,

I think the MergeTableCells function will be exactly what you're looking for.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3443
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 22 at 10:27PM
Hi Kevin,

thanks for being here.

Cheers and welcome,
Ingo
Cheers,
Ingo

Back to Top
chris_adsi View Drop Down
Team Player
Team Player


Joined: 19 May 21
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris_adsi Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 22 at 8:33AM
Ah perfect - thanks for that - had missed that function completely! 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store