We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is:
Please describe the behavior you are expecting. there are 3 ways to split one heading into two or more pages. but
only “分页符” can read as pageBreak element. other occasion only nothing elements excepte text. What is the current behavior?
Please help provide information about the failure.
Please provide a code sample that reproduces the issue.
<?php require __DIR__ . '/vendor/autoload.php'; $phpWord = \PhpOffice\PhpWord\IOFactory::load('t1.docx'); $sections = $phpWord->getSections(); $jiedian = []; foreach ($sections as $key => $section) { // dump($section->getStyle()); $headers = $section->getHeaders(); foreach ($headers as $key => $header) { $elements = $header->getElements(); foreach ($elements as $e1) { $class = get_class($e1); //获取word中对应内容类型类 // dump($class); $elname = explode("\\", $class)[3]; // dump($elname); if(false == in_array($elname, $jiedian)){ $jiedian[] = $elname; } } } foreach ($section->getElements() as $e1) { $class = get_class($e1); //获取word中对应内容类型类 // dump($class); $elname = explode("\\", $class)[3]; // dump($elname); if(false == in_array($elname, $jiedian)){ $jiedian[] = $elname; } } $footers = $section->getFooters(); foreach ($footers as $key => $footer) { // dump($footers); $elements = $footer->getElements(); foreach ($elements as $e1) { $class = get_class($e1); //获取word中对应内容类型类 // dump($class); $elname = explode("\\", $class)[3]; // dump($elname); // dump($e1->getText()); if(false == in_array($elname, $jiedian)){ $jiedian[] = $elname; } } } } dump($words);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is:
Expected Behavior
Please describe the behavior you are expecting.
there are 3 ways to split one heading into two or more pages.
but
Current Behavior
only “分页符” can read as pageBreak element.
other occasion only nothing elements excepte text.
What is the current behavior?
Failure Information
Please help provide information about the failure.
How to Reproduce
Please provide a code sample that reproduces the issue.
Context
The text was updated successfully, but these errors were encountered: