PhilterPaper / PDF-Table

Official repository for PDF::Table in Perl
https://www.catskilltech.com/FreeSW/product/PDF%2DTable/title/PDF%3A%3ATable/freeSW_full
Other
10 stars 15 forks source link

Documentation : default_text #67

Open stefanalt opened 3 years ago

stefanalt commented 3 years ago

default_text - A string to use if no content (text) is defined for a cell.

default_text is also printed after a page break if all content of a cell has already benn spent, but the row has to be continued because of other cells.

I like that feature, but it should be better expressed in the docs.

PhilterPaper commented 3 years ago

I have added some explanation to the POD to elaborate on that. It occurs to me that perhaps there should be separate default_texts for the first use in a cell (no cell content at all), and for following continuations of the cell onto new page(s). Would it be less confusing that way? The cell continuation default text could be equal to the first use string if no text is given. If, say, a cell were split over three pages, and had no content at all, the first page might say no content while second and third pages said no further content. What do you think?

stefanalt commented 3 years ago

Yes I think you are right. The current behaviour seems more like a bug. I wouldn't have expected it without looking in the code. I'm not a fan of all the various level default_text options. But as we have it, I think it should just replace the undef'ed cell_data and not do more magic things. I think the new pagebreak_text or cont_text (?) should have no default and should not inherit anything. Except you think this is required for compatiblity with the current behaviour.

My use case is as follows:

| label      | many lines regarding label |
---- pagebreak ----
| label..    | more text regarding label |
---- pagebreak ----
| label..    | remaining lines regarding label |