prawn icon indicating copy to clipboard operation
prawn copied to clipboard

Exposed current_column in ColumnBox

Open elsurudo opened this issue 8 years ago • 3 comments

I need this for the following use-case:

pdf.bounds.move_past_bottom if pdf.bounds.current_column == 0

elsurudo avatar Mar 10 '17 11:03 elsurudo

Why regular bounding box doesn't work for your use case?

pointlessone avatar Mar 10 '17 13:03 pointlessone

I have two "parts" of the text, and two columns.

If the first part of the text is shorter than the first column, I want the second part of the text to start at the top of the second column.

If the first part of the text is longer than the first column, I want it to wrap to the second column, and I want the second part to start below the end of the first part.

I wasn't sure how to accomplish this otherwise, but I was able to with the change I made.

elsurudo avatar Mar 10 '17 13:03 elsurudo

ColumnBox exposes left. It's the left side of the current column. It's going to be 0 for the first column.

Would that work for you?

pointlessone avatar Mar 10 '17 14:03 pointlessone

I'm closing this as there's another way of achieving your goal. Feel free to reopen if you think this can be improved to be a universally useful feature.

pointlessone avatar Jan 16 '24 15:01 pointlessone