Forum


Replies: 4   Views: 3139
Page numbering when merging
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 loktron  · 13-12-2016 - 09:41

Hello,

I have a new problem. I generate many seperate letters and the merge them with the merge method with the page numbering restart method. Most of the Times it works, but sometimes, if the is very little content on the last page, the numbering is wrong. For example i have page 1,2,2 instead of 1,2,3.

Sometimes this happens when merging, sometimes the merged File is correct but the numbering goes wrong when converting to pdf in the same way. Sometimes the second case can oodly be fixed with just doing the conversion twice. So convert, delete pdf and convert again. I reproduced the latter problem when doing conversion with word by hand.

Any solutions?

Conversion using libre office and open office is not an option, for it breaks all the formatting, which is the reason we used phpdocx in the first place.

Posted by admin  · 13-12-2016 - 10:46

Hello,

If you are not using the conversion plugin to transform DOCX to PDF, how are you transforming the documents? Using MS Word and PHP COM (transformDocxUsingMSWord method)? Which version of MS Word are you using to do the transformations?

Please send one of the documents with a wrong numbering to contact[at]phpdocx.com

Regards.

Posted by loktron  · 13-12-2016 - 10:54

 I use the coversion using word method. But the problem is allready there after merging.

I will send you examples before and after merging plus the template

Posted by loktron  · 13-12-2016 - 11:07

ah and I forgot to tell, i use word 2016 but i tried it with 2010 and it is the same problem. If I manage to get the numbering right in the merged file, i can fix the problem while converting with converting it twice, so that is no problem.

Posted by admin  · 13-12-2016 - 13:05

Hello,

The problem comes from MS Word that is unable to know that the third page has a content in it when there's a table from the previous page with the Allow row page break option value as true and the numbering is set as restart (setting it as continue works fine). If you open the DOCX output and do some line breaks (or add a hide content) it updates the numbering correctly (LibreOffice handles this special situation fine without doing changes).

Regards.