Forum


Replies: 3   Views: 1400
Libreoffice pdf export and native pdf export can not interpret linebreaks created by bulkprocessing
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by michael.stubenvoll  · 27-10-2020 - 10:13

Hi,
I just found a bug, when trying to convert a docx file to a pdf file, which has before added newLines through the replaceText (with option parseLineBreaks) method. In MS Word 2006, the document looks fine. But when I try to save the document as an pdf, the new inserted newLines are ignored.


The problem only appears when using the replaceText method from Bulk Processing.
When I use the replaceVariableByText method from the CreateDoxcFromTemplate Class the exported pdf file looks fine.
I compared both word sources and indeed the resulting source code is different:
Bulk Processing:

<w:t xml:space="preserve">Herr<w:br/>Harry Bittner<w:br/>ImNebelloch 18<w:br/>71034 Böblingen</w:t>

CreateDoxcFromTemplate:

<w:t xml:space="preserve">Herr</w:t><w:br/><w:t xml:space="preserve">Harry Bittner</w:t><w:br/><w:t xml:space="preserve">ImNebelloch 18</w:t><w:br/><w:t xml:space="preserve">71034 B&#xF6;blingen</w:t>

I hope you can help me with a fixed for that.
Greetings
Michael