0

I'm working with PDFLib (9.0.4) with PHP 5.5 to create a very large table with a lot of very small cells.

I'm aware that PDFLib use a special algorithm to fit the table into a specified space. I would like to know how to prevent some cells to shrink.

My current problem is that some time to time, certain cells are not shrinked the same way as others while those cells are empty.

I tried to play with the column witdh, margins, ... nothing really worked.

I tried to play with horshrinking and vertshrinking options when I call the PDF_fit_table function. But those options are too general. I'm looking for a way to prevent only certain cells to shrink.

Thank you for your time.

EDIT This is not a problem of shrinking cell but stretching instead.

2 Answers2

0

I've got the answer to my problem : you just have to specify vershrinklimit and horshrinklimit option into the PDF_fit_table function.

But I've post the wrong question. My problem is not a shrinking cell but un stretching one. My cell is empty and fit_table stretched it while it's not wanted.

0

I've found the solution to my problem.

by default, in case the parameter was not provided, I was pre-pending a colwidth for every cells ... even for colspaned cells.

So, if one of my table chunks were ending by colspaned cell with a colwidth specified, the colwidth were applied to every other cells above.

The solution was to test if the cell options string was containing the colspan parameter. If so, no colwidth parameter is prepend.