-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact list: keep family all on one page #885
Comments
#885: Don't let names or addresses be split across pagebreaks
PR is a good step in the right direction. Unfortunately solving this properly would be really tricky. The way we currently assemble the DOCX doesn't have any awareness of where the page breaks are. For my part I just manually break pages as required before printing. |
The solution is to put the whole family within a table of just one cell then set the option to not split the table across page or column breaks. I can't find that option in Word 2010 but it honours the option when I create the document with Libreoffice. Attached are the two documents I feed into the document merge process. |
Ah yes I can see this would work for a document merge. But this issue is actually talking about the "contact list" page which does merging differently, with more sophisticated layout per family.
The downside of this approach in the contact list, and the reason for not building it this way, was that by using nested tables you'd lose global control over the layout. If you decide you want the mobile column a bit wider, currently you can adjust it and every family is affected because it's one big table. If it was separate nested table for every family, you'd have to manually adjust every one separately. |
@jefft When photos are included, there is a cell containing the photo which spans all the rows in the family. If cantSplit=true affects that cell, I think that will end up keeping the whole family together when photos are included. |
@tbar0970 no, the photo cell is only in the first row. This is probably a separate bug: |
Eww. Dunno what's happened there... |
Would a solution to that be to have some parameters to the process that can specify things like column widths, borders and padding? |
That probably is the only fix. There doesn't appear to be a way, in PHPWord, just to say "keep these table rows altogether". Manually specifying widths would be a cure would be worse than the disease I reckon. IMO this is a "close can't fix" bug. Keeping row contents from being split fixes the most egregious symptom. |
Document merge (or rather TinyButStrong which it uses) might provide a way. |
I am currently working on a 'use document template' feature for the contact list. |
I've got it working. The code is pretty messy at present and I haven't figured out what to do about images - not sure if they are possible. |
In Families -> Contact List one can generate a church directory-style contact list, and then 'Download as..' DOCX.
It would be nice if family members could be kept together on a page, rather than being split on pagebreaks:
The text was updated successfully, but these errors were encountered: