Speculative execution, groups, or anything comparable

18 views
Skip to first unread message

Seebs

unread,
Aug 29, 2017, 1:38:19 PM8/29/17
to Prawn
The basic question:

I have a possibly-large list of nested objects. I wish to display them. They could be larger than a page. Automatic page-flow doesn't suit this workflow for a number of reasons. (Among them: First page needs a special header on top, last page needs a special header on bottom. If you were to suspect that these documents were similar to invoices or statements, you would not be far wrong.

It used to be I could basically do what I wanted with group, but that's gone because it apparently produced corruption.

So... What options are available? What's idiomatic and maintainable?

My current thought is to have each item have parallel rules for drawing itself, and for computing its height, and use the height-computing rule to determine when and where to page break. But then the code fragments could potentially be out of sync with each other...

Another idea was to just make a dummy document defined with an excessively-huge height, and render everything to it once to find out its height, and then render it to my real document in an appropriate context.

But maybe I'm missing a thing?

Paulo Fidalgo

unread,
Sep 29, 2017, 11:32:36 AM9/29/17
to Prawn
Actually I have the same question posted on stackoverflow: https://stackoverflow.com/q/46402741/1006863
Reply all
Reply to author
Forward
0 new messages