deleteBlock перестает работать, если слишком много слов - PullRequest
0 голосов
/ 28 января 2019

Я пытаюсь использовать deleteBlock в моем шаблоне, но если в моем шаблоне слишком много символов / слов, deleteBlock перестает работать.

Например, я использую простой шаблон (вообще без форматирования, новый файл docx) с этим текстом:

PHP Word
PHPWord is a pure PHP library for reading and writing Word, ODT, and RTF files. This file is the source file of read/write capabilites of PHP Word. The text in red should be changed when writing.
${delete}
PHPWord can apply font formats such as bold, italics, color, underline, strikethrough, subscript, superscript, or highlighted. You may also notice that there’s one text break (empty paragraph) before this one that can be created also by PHPWord.
${/delete}
PHPWord can also format paragraph such as this justified, 12pt before and 12pt after with 1.5 lines spacing paragraph. This formatting can be applied inline or using predefined style as we use to do in Word.

Это работает, но если я добавлю один абзац, он не будет работать:

PHP Word
PHPWord is a pure PHP library for reading and writing Word, ODT, and RTF files. This file is the source file of read/write capabilites of PHP Word. The text in red should be changed when writing.
${delete}
PHPWord can apply font formats such as bold, italics, color, underline, strikethrough, subscript, superscript, or highlighted. You may also notice that there’s one text break (empty paragraph) before this one that can be created also by PHPWord.
${/delete}
PHPWord can also format paragraph such as this justified, 12pt before and 12pt after with 1.5 lines spacing paragraph. This formatting can be applied inline or using predefined style as we use to do in Word.
PHPWord can also format paragraph such as this justified, 12pt before and 12pt after with 1.5 lines spacing paragraph. This formatting can be applied inline or using predefined style as we use to do in Word.

Здесь мои файлы, которые кто-то хочет попробовать:

https://wetransfer.com/downloads/b6731f6817ce7a8f0991546b02d4596120190128110140/5babac

Знаете ли вы, есть ли ограничения для deleteBlock?

Знаете ли вы, есть ли другие альтернативы phpword и deleteBlock для генерации длинного текста из шаблона?

Спасибо за вашу помощь, это сводит меня с ума!

...