Closed abeverley closed 4 years ago
There isn't an out-of-the-box property for that but can be work-arounded with text_block() or cell_callback_func. I'm more than happy to merge a PR that introduces a property with html-like behaviour.
Thanks for the (very!) quick reply, and thanks for the information.
Would you be interested in sponsorship to implement such a feature?
Wow, It's been a while after my first fast response, apologies. I'm not interested in implementing the feature but i believe i can find a person that can do that for you - all credits and sponsorship will go to them if you both like each other :) shall I poke around for a suitable person?
No problem, thanks for letting me know, and thanks for the offer. I've actually recently approached @domm who is interested, so I'll see how that goes, and I'll let him liaise with you in terms of the implementation. Many thanks!
Without having looked at the code yet, I see two options to add the col-span param: a new entry in the cell_props
, or by passing a hashref instead of a string in data
:
via cell_props
it could look like:
$cell_props->[4][2] = {
col_span => 2
};
via data
:
my $some_data = [
[ 'Header', 'Row', 'Test' ],
[ '1 Lorem ipsum dolor', 'Donec', 'consequat quis, tincidunt vel, felis.' ],
[ { text => 'this will span!', col_span => 2 }, 'the third colum' ],
]
I think the second option feels nicer, because everything is in one place. But as the rest of the API is using cell_props
I guess adding a new cell_prop is more in line with the rest of the module.
Any opinions on that?
@kamenov - do you have any thoughts on @domm's comments above please? Many thanks.
I prefer the cell_props approach as it is in line with the rest of the code and also it's not a good practice to modify your input data. (sorry for the delayed response)
There is a "colspan" feature in PDF::Table. Does this do what you are looking for? If so, I can close this ticket.
I found a work-around, outside PDF:: Table, so this is not currently on my radar. But seeing you get active on P::T, let me try to get back to it. Watch this space!
Mike West mwjwest@gmail.com
Phone & WhatsApp: +1-302-559-3642 Address: Casa Alquimía 350 m SUR y 80 m ESTE de la Gasolinera Monteverde Monteverde, Puntarenas, Costa Rica 60109 www.facebook.com/mwjwest mwjwest.wordpress.com
On Fri, Apr 10, 2020, 8:48 AM Phil Perry notifications@github.com wrote:
There is a "colspan" feature in PDF::Table. Does this do what you are looking for? If so, I can close this ticket.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PhilterPaper/PDF-Table/issues/46#issuecomment-612061578, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHPAFG2DCZ6V4RJY2CYQTLRL4WUXANCNFSM4FXSD62Q .
There is a "colspan" feature in PDF::Table. Does this do what you are looking for? If so, I can close this ticket.
Yes, this feature has now been implemented and merged (sponsored by me, written by @domm), so this issue can be closed now. Many thanks.
Is there any way to span cells across multiple columns? E.g. similar to the HTML colspan attribute.
If not, I would be interested in sponsoring the implementation of this feature.