Open 1manfactory opened 7 years ago
As a quick hack or as a solution?
As a quick hack (for usage of creating an empty document and using add*() functions to add sections and text):
in file ./src/PhpWord/Writer/ODText/Part/Styles.php
, search for function writePageLayout()
and add it between the others.
$xmlWriter->startElement('style:page-layout');
$xmlWriter->writeAttribute('style:name', 'Mpm1');
$xmlWriter->writeAttribute('style:page-usage', 'mirrored');
That's a good idea. But i never touch the original source codes as I will never be able to keep track of all customized stuff when doing updates.
I implemented it for docx documents, nothing for ODT documents so far :-( see PR #1183
@1manfactory Do you need an implementation for ODT or are you generating a docx?
When creating book to be printed on paper you need different inner and outer margin. The inner margin uses to be wider because of the gutter.
I made a bit of reverse engineering on an OpenOffice document.
<style:page-layout style:name="Mpm1" style:page-usage="mirrored">
How can I apply this? Or do I have do wait for future versions?
I can't find the keyword "mirrored" anywhere in the sources.