Open giuseb opened 9 years ago
I will look into it.
A general note: This plugin is not an extraction from prawn. It is a totally different approach to what prawn did. Prawn tried to implement transactions for grouping, which resulted in uncontrollable deep copy issues and got the feature disabled in the end. This plugin attempts to simulate the grouping block in a new document (replicating the basic document structure) and then executes the "best" match in the original document.
Got it, thank you. Please let me know if there is something else I can do to help. I looked at the source and could not spot an obvious explanation right away.
Just want to let you know, that I have not forgotten about this. Found the underlying issue, but no acceptable solution at this point.
Thanks. Any chance you could briefly point out the issue? Is it the columns? Just wondering if it's something I might take a stab at myself...
Yes, the columns do not get reflected in the virtual copy. The grouping worked in some test cases but not in others, because a full width text is obviously only about the length of the same text within columns. My current approach is simply to replicate the columns, but I have not found a clean solution yet.
Hi again, I may have worked out a solution to this issue. The idea is to manipulate the way the virtual document is initialized, by removing left and right margins and setting its width to that of the current bounding_box. I have created a feature branch, please let me know if it looks reasonable to you. I should probably add a few more specs, by the way. Cheers, Giuseppe
I get the idea and see why this works for your column problem, but I have a bad feeling about what this might do to more complex groups. I will do some tests (I will try to break it) and consider a beta release if this is the only solution we can come up with to solve this.
I have multiple-choice test sheets with two columns, and I want the entire Q&As item to stick together. In some cases, however, the content gets split across columns.
This spec replicates the behavior, which I did NOT encounter using Prawn 1.0.0.rc2 (just prior to when grouping was disabled).
(please note that the spec simply writes the PDF file; sorry, I don't know how to formulate proper expectations in this context)