Skip to content
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

[enhancement] Page breaks #371

Closed
jdcrecur opened this issue Jan 30, 2018 · 2 comments
Closed

[enhancement] Page breaks #371

jdcrecur opened this issue Jan 30, 2018 · 2 comments

Comments

@jdcrecur
Copy link

This package is REALLY good, and works like a charm!

Our use case is we are printing reports from a database into word files. We ask the client to produce their own tpl file, upload to our system, they can then choose to create a batch of reports using the said tpl file.

Each docx file produced typically includes a cover sheet followed by a loop which iterates on average 20 times. The client requires that each loop be printed on a single page which would basically result in 1 cover page followed by 20 subsequent pages, 1 for each loop iteration.

To achieve this, the opening loop tag starts at the top of a page and we then ask the client to enter the content for each loop followed by a page break with the closing tag at the top of the subsequent page in the tpl.

This is a working solution, but is not ideal and for the non-tech savy they are finding this difficult to grasp. It can also result in a trailing empty page at the end of the produced document.

It would be great if the loop could have some attributes attached to dictate this eg:

{#data_loop occupy-full-page}
Date: {date}

Incident: 
{incident_report}

Reporter: {reporter_name}

{/data_loop}

With something like occupy-full-page attribute this could instruct the loop to essentially place a page break at the end of the loop automatically meaning each loop iteration would start at the top of a new page each time, or in other words have the affect of occupying a full page, even if the report did not fill the full page.

@edi9999
Copy link
Member

edi9999 commented Jan 30, 2018

Yes that issue is indeed a real problem.

It has already been reported in #182, so I'm closing this one. Everything that if are the {# is given to the angular parser so I don't want to add anything after the {#.

@edi9999 edi9999 closed this as completed Jan 30, 2018
@jdcrecur
Copy link
Author

Ah I did look, but did not see this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants