Print Page | Close Window

Colspan and Rowspan in tables

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3982
Printed Date: 29 Mar 24 at 8:57AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Colspan and Rowspan in tables
Posted By: chris_adsi
Subject: Colspan and Rowspan in tables
Date 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



Replies:
Posted By: Ingo
Date 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



Posted By: chris_adsi
Date 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


Posted By: Ingo
Date 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



Posted By: chris_adsi
Date 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? 






Posted By: kevinqpl
Date Posted: 19 May 22 at 7:33PM
Hi Chris,

I think the MergeTableCells function will be exactly what you're looking for.


Posted By: Ingo
Date Posted: 19 May 22 at 10:27PM
Hi Kevin,

thanks for being here.

Cheers and welcome,
Ingo


-------------
Cheers,
Ingo



Posted By: chris_adsi
Date Posted: 20 May 22 at 8:33AM
Ah perfect - thanks for that - had missed that function completely! 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk