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

Page break for ODT #824

Closed
Issamatonis opened this issue Jun 21, 2016 · 5 comments · Fixed by #1206
Closed

Page break for ODT #824

Issamatonis opened this issue Jun 21, 2016 · 5 comments · Fixed by #1206

Comments

@Issamatonis
Copy link

Issamatonis commented Jun 21, 2016

Hello,

i'm trying to generate docx and odt files. addPageBreak() work with docx, but not with ODT, i have all the content in the same page


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@msphn
Copy link

msphn commented Aug 16, 2016

Same for me with 0.13 and dev branch.

@msphn
Copy link

msphn commented Aug 16, 2016

It's actually not even implemented for the ODT writer. That's the problem, it's not a bug, it's a missing feature, the ODT writer lacks of a lot features.

@msphn
Copy link

msphn commented Aug 16, 2016

@Issamatonis did you find any workaround? Or implemented yourself?

@Issamatonis
Copy link
Author

Issamatonis commented Aug 18, 2016

@cookiekiller : i used WORD to create the content then ODT to save the file:

$word = new \PhpOffice\PhpWord\PhpWord();
$section = $word->addSection(array('orientation'=>'portrait'));

-- section content--

$nom_du_fichier_odt = "nom_fichier.odt";
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($word, 'ODText');
$objWriter->save($chemin . $nom_du_fichier_odt );

@msphn
Copy link

msphn commented Aug 18, 2016

@Issamatonis thanks for your answer, I implemented pagebreak meanwhile and created a pullrequest: #863

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

Successfully merging a pull request may close this issue.

3 participants