ralfstuckert/pdfbox-layout

Frame around a set of paragraphs possible?

Closed this issue · 2 comments

In my pdf I have a set of paragraphs constisting of normal paragraphs with text and a column layout to have a table with some values. Now I would like to put a frame around this and may use some background color to highlight this text area.

A frame around a simple paragraph can be used without any problem.
But how do I define a frame around this set:

  • a paragraph (with some ttext to introduce the theme)
  • a layout of four columns in three lines with a paragraphs in each column/line (presenting some values)
  • finally another paragraph (with some final statements for this theme)

How can I define a frame that overlaps a set of paragraphs?
How can I get the positions to stat and end the frame?

This would be easy with nested layouts or a table object.
Is there a time line for these?
I know, you are busy with other stuff, Ralf ... but do you have some code to test and maybe develop together?

Nested layout is the key to all open features. Alas, this would require a complete rewrite of the layout engine...that's why they are all still open :-/
Sorry

I have found a workaround for my situation...
I have switched to a set of columns with only one paragraph (but many lines) in each column.
A Frame is defined around the paragraph in the first column and the width of the frame is set to documnet width.
So I can create the text of the paragraphs depending on the special case and use a fixed width and variable height of the frame.
I have to admit, that the final paragraphs (in vertical layout) does not go into the frame, but I can live with that ...