-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Create a sort of "mail merge" with a template #2368
Comments
I added a parameter $separator to the cloneBlock function, and replaced if ($replace) { by if ($replace) { Then for page_break, |
Description of the query
I have a docx (Word 2016), in which I set a template with placeholders, and with a header and footer. When I use the templateProcessor methods, I can't manage to respect the layout.
Is this achievable with some twisting the code, is it not implemented, or is it a bug or a feature missing ?
Steps to Reproduce
1 - Using the cloneBlock method, I manage to create ONE docx with every elements, but the layout is not respected
In the word
In the php
2 - Using the setValue method, the layout stays perfect... but I have N documents generated, if there are N elements : this is useless !
Expected Behavior
With a php loop over the elements (Users, Session...), I want to generate a docx with as much as the loop number of element, WITH CONSERVATION OF THE TEMPLATE LAYOUT : if I expect an element to generate 2 pages, I want for instance the second element starting on page 3, even if "there is room left on page 2"
Current Behavior
The next element is not on the next page, but immediately after the end of the previous one (~ no equivalent to page break)
Context
The text was updated successfully, but these errors were encountered: