PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

Make Template Processor protectable

Open sawirricardo opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Current TemplateProcessor doesn't allow to be saved with Protection, either setting as readonly is not achievable. Current workaround is to save the TemplateProcessor, and then load it with IOFactory::load(). However, that breaks the layout as in images gets large, table layout broken, etc. Since IOFactory cannot load all the specs.

Describe the solution you'd like

I would love to create like (new TemplateProcessor($file))->setProtection(new Protection(... settings availble))

Describe alternatives you've considered

other alternative is to use IOFactory, but that doesn't guarantee the existing layout not broken. Maybe fine with simple layout.

Additional context

no need

sawirricardo avatar May 27 '22 12:05 sawirricardo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue for you, please try to help by debugging it further and sharing your results. Thank you for your contributions.

github-actions[bot] avatar Sep 22 '22 02:09 github-actions[bot]