By: Irfan
Date: 2015-01-16
Time: 00:55
|
Facing merge problem in more than 2 .docx files.I found the solutions in stackoverflow for the 2 .docx merging file but when I used it then it is destroying the Microsoft word document's format. But my problem is I need to merge at least 5 to 10 MS word documents and when I tried to modify the code its not allow to merge multiple documents. Would anybody help me out to provide me the code or details how can I merge multiple MS word documents.
Thank you in advance Following is the code which I'm using:
|
|
By: Skrol29
Date: 2015-01-17
Time: 23:51
|
Re: Facing merge problem in more than 2 .docx files.Hi,
What do you mean by > it is destroying the Microsoft word document's format. and > its not allow to merge multiple documents The solution given in Stackoverflow and on this forum does warn that the definitions of the internal formats must be the same between the tow documents otherwise they may be format bugs. The code shows the trick for 2 DOCX, if you understand what is is done, you can adapt it for several DOCX. |
|
By: Irfan
Date: 2015-01-18
Time: 12:42
|
Re: Facing merge problem in more than 2 .docx files.> it is destroying the Microsoft word document's format.
When I use above code it doesn't merge properly let say if word document has 2 pages and when I merged using above code its added few spaces and removed the table's border after merging its show in 2.5 pages. > its not allow to merge multiple documents This above code is working perfectly for 2 docx. But when I try to 3 or more docx merge and it is not working. So I need sample code for multiple docx merging. >>>The code shows the trick for 2 DOCX, if you understand what is is done, you can adapt it for several DOCX. TBS does not allow merge docx more than 2 files? Please help me in this regards. I really appreciate your help and quick response. Thanks |
|
By: Skrol29
Date: 2015-01-19
Time: 00:52
|
Re: Facing merge problem in more than 2 .docx files.The problem you have when merging docx files is normal.
That's the limitation of this technical, and I don't know any other technical that can combine two DOCX into a single one with PHP. It can work only if internal definitions such as formats, images, charts, ... are identical between the two DOCX, which is quite hard to be done. See http://www.tinybutstrong.com/forum.php?thr=2757 For merging more than 2 files, it seems quite easy when reading the snippet. Is is more a PHP question that a TBS question. One part of the script is getting the body content a the first DOCX, and the second part of the scrip is inserting the content at the end of the body of the second DOCX. |