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

$this->section->addTitle($titleName, $depth); the $depth max value #2380

Open
pro911 opened this issue Feb 15, 2023 · 0 comments
Open

$this->section->addTitle($titleName, $depth); the $depth max value #2380

pro911 opened this issue Feb 15, 2023 · 0 comments

Comments

@pro911
Copy link

pro911 commented Feb 15, 2023

Describe the Bug

$depth If the maximum value exceeds 3, word2007 becomes invalid

Steps to Reproduce

setp1

<?php
require __DIR__ . '/vendor/autoload.php';

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$section->...


$this->section->addTitle('x1', 1); 
$this->section->addTitle('x2', 2); 
$this->section->addTitle('x3', 3); 
$this->section->addTitle('x4', 4); 
$this->section->addTitle('x5', 5); 

Here are the results :
image

Expected Behavior

I want to know what the maximum value of $depth is

Current Behavior

What is the current behavior?

Context

Please fill in your environment information:

  • PHP Version: 8.1
  • PHPWord Version: 1.0.0 or 0.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant