-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Quotation border only printed on last page #557
Comments
Framing for quote blocks that span multiple pages is not yet implemented. In fact, the only block type that currently supports this scenario (as of 1.5.0.alpha.13) are listing and literal blocks. The same treatment / logic needs to be applied to all blocks that have framing or background. This is a duplicate of #270. Here are the issues to track multi-page support for various block types for reference:
|
quote & verse is very different from implementing sidebar & example. First call means lowest z-index. Drawing a background rectangle means it needs to be called before anything else. However, asciidoctor relies on prawnpdf to determine where to put characters or even page breaks. Hence in between setting text across multiple pages, it would be required to draw the rectangles. Basically prawnpdf's API is too poorly engineered for such use cases. The only workaround I can see is manually interrupting setting text and checking whether As far as this issue is concerned, a fix is available. I consider it fixed. |
We don't close issues until the PR is merged, so I'm going to reopen until then. |
I agree the Prawn API is poor at helping with layout, but I created a two-phase writer in the converter for precisely this use case. (I'll admit this API is still rough around the edges, but it gets the job done for now). The first phase performs a dry run that brings back the total height (it should also return the the start page and the end page, so I might add that). From that information, you can perform all the graphics work at the beginning of the second phase, then write the content. |
I'll share that it took me several weeks to come up with a solution for dealing with Prawn's single-pass rendering. That led me to using a scratch document, where I can test content before "burning" it into the main document. |
I've send a revised pull request to your pull request. If that looks good to you, merge it and I'll rebase and push upstream. |
Resolved by 471af37. |
Thanks for improving it! |
Given:
Expected:
One border lefthandside to the quotation on both pages.
Actual:

First page shows no border. Second page has a border lefthandside to the quotation on both pages.
The text was updated successfully, but these errors were encountered: