Re: FO to DOCX in Word 2016

Hussein Shafie <[email protected]> Tue, 11 Sep 2018 11:38:29 +0200
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
I've used the first XSL-FO file "tc-fo-1" you sent us, after renaming it 
to "tc-fo-1.fo", to reproduce the issue here. The second XSL-FO file you 
sent us, "tc-fo" is too large --7.9mb-- to be convenient to modify by hand.


Description of the issue:
-------------------------

When you open "tc-1.docx", the result of the conversion of "tc-fo-1.fo", 
in MS-Word 2016, the first appears to be TRUNCATED. Only the first few 
pages are displayed by MS-Word 2016.

There is no such problem when you open "tc-1.docx" in MS-Word 2007 to 2013.

There is no such problem when you open the equivalent "tc-1.odt" in 
OpenOffice/LibreOffice.




Diagnostic:
-----------

MS-Word 2016 "Print Layout" shows a truncated view of "tc-1.docx". See 
attached "print_layout_truncated.png".

MS-Word 2016 "Web Layout" shows a normal, full, view of "tc-1.docx". See 
attached "web_layout_OK.png".

The truncations happens just before "Table 1".

Hence, unlike older versions, MS-Word 2016 "Print Layout" does not 
support the way you have formatted the tables contained in "tc-1.docx".




Workaround:
-----------

The way you have specified how "Table 1" and "Table 2" should be 
formatted is quite peculiar. See attached "original_table1.png".

After simplifying this as depicted in attached "my_table1.png", the 
problem disappears.

I did what follows is in "Table 1" and "Table 2".

1) Replaced width="8.5in -1.0in - 1.0in" by width="100%" in the outer table.

2) Made this outer table a single column table. (It was a 3 column table 
with rows containing 2 empty cells.)

3) Replaced width="8.5in -1.0in - 1.0in" by width="100%" in the innner 
table.

4) Set column-width="proportional-column-width(1)" on all the 3 
fo:table-columns of the inner.

I've attached the modified XSL-FO file "my-tc-fo-1.fo", to this email. 
I've converted it to attached "my-tc-fo-1.docx", which is displayed just 
fine by MS-Word 2016 "Print Layout".




Conclusion:
-----------

This is definitely not a XMLmind XSL-FO Converter bug. It's your XSL-FO 
file which has a number of issues.

Also note that:

- Your XSL-FO file has other errors (e.g. font-family="").

- Apache FOP fails to convert it to PDF ("The flow-name "blank-body" on 
fo:static-content could not be mapped to a region-name in the 
layout-master-set").




On 09/11/2018 08:01 AM, Uma Shankar M wrote:
>
> I checked the below release notes and could not see anything suspicious.
> We have started using the tool in 2013 and continue using the same.
> Recently, we have started seeing issues with the converted outputs.
> Earlier we ran it from Windows server 2008; and now we started using
> Windows Server 2012.
>
>
>
> mailbox:///home/hussein/.thunderbird/oy5rkxwd.default/Mail/Local%20Folders/Inbox?number=61&header=quotebody&part=1.1.2&filename=image001.png
>
>
>
> Also, I am seeing the same issue in my laptop (Windows 10). I have tried
> with version 5.5 and received same output. I have tried without any
> images and attached the FO and DOCX files. I have generated the attached
> docx using 5.5 evaluation version. My Java version is "1.8.0_161".
>


--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support
print_layout_truncated.png (image/png, 104.8 KB) - not displayed
web_layout_OK.png (image/png, 129.4 KB) - not displayed
original_table1.png (image/png, 62.8 KB) - not displayed
my_table1.png (image/png, 59.2 KB) - not displayed
my-tc-fo-1.fo (text/x-xslfo, 162.4 KB) - not displayed
my-tc-fo-1.docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document, 30.7 KB) - not displayed