-
Notifications
You must be signed in to change notification settings - Fork 12
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
Page breaks #123
Comments
hi, can you share an example template document? how are you doing the looping? perhaps you could try someting like this (I have not tested the idea):
|
Hi, template looks like the below
{%for shareholder in Case.contacts%}{%if shareholder.ctype == “H”%}
Content
PAGEBREAK{%end%}{%end%}
From: Janos Erdos ***@***.***>
Sent: 26 May 2022 17:05
To: erdos/stencil ***@***.***>
Cc: Alex Power ***@***.***>; Author ***@***.***>
Subject: Re: [erdos/stencil] Page breaks (Issue #123)
hi, can you share an example template document?
how are you doing the looping? perhaps you could try someting like this (I have not tested the idea):
{%for i in range(size(elems))%}
{%if i != 0%} <PAGE BREAK HERE> {%end%}
rest of document with parameters included like {%=elems[i].price%} etc.
{%end%}
``
—
Reply to this email directly, view it on GitHub<#123 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHXS763QJQBEHRS4W4HQZQLVL6OLXANCNFSM5XBTPZMA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
I created a working example based on the idea above, see in attachment. This does not render the empty page. Example payload:
|
This looks like an interesting use case, I created two issues to help solve the problem in a simpler way: |
Thanks , I like the function route. Saves actually having the page break when working with the document . I find it hard to follow at times
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Janos Erdos ***@***.***>
Sent: Thursday, May 26, 2022 5:37:53 PM
To: erdos/stencil ***@***.***>
Cc: Alex Power ***@***.***>; Author ***@***.***>
Subject: Re: [erdos/stencil] Page breaks (Issue #123)
This looks like an interesting use case, I created two issues to help solve the problem in a simpler way:
* #124<#124>
* #125<#125>
—
Reply to this email directly, view it on GitHub<#123 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHXS76YKISDFDVHZWAVANNLVL6SGDANCNFSM5XBTPZMA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi, the two changes have been just released with version The solution for the inital task looks something like this now:
|
Thank you for implementing this. Ill upgrade the package this week and let you know how I get on
From: Janos Erdos ***@***.***>
Sent: 01 June 2022 22:41
To: erdos/stencil ***@***.***>
Cc: Alex Power ***@***.***>; Author ***@***.***>
Subject: Re: [erdos/stencil] Page breaks (Issue #123)
Hi, the two changes have been just released with version 0.4.3.
The solution for the inital task looks something like this now:
{%for idx, c in contacts %}{%if idx > 0%}{%=pageBreak()%}{%end%}
BODY HERE FOR {%=c.ctype%}.
{%end%}
—
Reply to this email directly, view it on GitHub<#123 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHXS763B5QRPLT2US5MBFBTVM7KILANCNFSM5XBTPZMA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
did it work? :-) |
We output our mail merge to one word document, idea being that each new letter is on a new page. To accomplish this i have a for loop wrapped round a page break. The output always has a additional page instead of ending straight after the last document.
The text was updated successfully, but these errors were encountered: