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

cloneBlock property does not function properly with files exceeding 145KB in the template. #2584

Open
jcesarht opened this issue Mar 9, 2024 · 0 comments

Comments

@jcesarht
Copy link

jcesarht commented Mar 9, 2024

Describe the Bug

Hi there,

I need assistance regarding a template property issue.

I attempted to export a document, and the process seems to be working fine. However, the information within it is incomplete. Here's the situation:

I imported the template using the following code: $this->document = new TemplateProcessor('file.docx');.

The document is divided into three parts. The first part functions correctly. The second part involves cloning a section with $this->document->cloneBlock('name_block', 0, true, false, $array_values), which works as expected. However, upon adding a circular shape to the third part, the second section malfunctions.

Upon investigation, I discovered that the template exceeds 145 KB, causing it to malfunction. However, removing the shape resolves the issue, and the code functions correctly.

Could you please assist me with this? I'm unsure how to proceed with troubleshooting.
A clear and concise description of what the bug is.

Steps to Reproduce

Please provide a code sample that reproduces the issue.

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

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

Expected Behavior

A clear and concise description of what you expected to happen.

Current Behavior

What is the current behavior?

Context

Please fill in your environment information:

  • PHP Version:
  • PHPWord Version:
@jcesarht jcesarht changed the title cloneBlock property does not function properly with files exceeding 145MB in the template. cloneBlock property does not function properly with files exceeding 145KB in the template. Mar 9, 2024
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