Word docx file rendering incorrectly

Creating a macro - Writing a Script - Using the API

Word docx file rendering incorrectly

Postby zmotiwala » Tue Oct 30, 2012 8:55 pm

Attached is a Microsoft Office 2007 docx file.

This converting to a pdf incorrectly.

The heading is totally missing.

Please advise on what other property values I can set to ensure that the pdf is exported just as the original file.
Attachments
OfficeWordIntegrationSampleFile.docx
(29.36 KiB) Downloaded 323 times
Libre Office 5.2.5
Windows
zmotiwala
 
Posts: 41
Joined: Wed Dec 28, 2011 5:34 pm

Re: Word docx file rendering incorrectly

Postby Hagar Delest » Tue Oct 30, 2012 11:31 pm

What about using MS Office?
docx has not really been designed to be compatible with anything else than MS Office.
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28718
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Word docx file rendering incorrectly

Postby Villeroy » Tue Oct 30, 2012 11:31 pm

Download and install the Microsoft WinWord viewer and a virtual PDF printer. Let the viewer print to the virtual printer.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27881
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Word docx file rendering incorrectly

Postby Carlos Rocha » Wed Oct 31, 2012 2:56 am

Hagar Delest wrote:What about using MS Office?
docx has not really been designed to be compatible with anything else than MS Office.


True, but OpenOffice is supposed to be able to open it. Ubuntu louds it http://www.ubuntu.com/ubuntu/features/office-applications
Anyway, your answer is not really to help or "moderate". :shock:

@zmotiwala,
I tested it and you are right. Also the OpenOffice Navigator looks strange in the headings. Maybe you should report it as a bug.
OpenOffice 3.4 on Windows 7
Carlos Rocha
 
Posts: 3
Joined: Thu Feb 02, 2012 9:35 pm

Re: Word docx file rendering incorrectly

Postby RoryOF » Wed Oct 31, 2012 7:35 am

Carlos Rocha wrote:
Hagar Delest wrote:What about using MS Office?
docx has not really been designed to be compatible with anything else than MS Office.


True, but OpenOffice is supposed to be able to open it. Ubuntu louds it http://www.ubuntu.com/ubuntu/features/office-applications
Anyway, your answer is not really to help or "moderate". :shock:


If the Ubuntu reference is incorrect you should take that up with Ubuntu. In any event, that link refers to LibreOffice which has reportedly better support for some of the MS office formats; if you are using the Ubuntu distro version you should change your forum signature to reflect this, as there are differences in the different versions, which is partly the reason for their existence. No version of OpenOffice, be it Apache OpenOffice or LibreOffice (or any other, if there be such) purports to be an exact MS Office clone with exact format invariance, still less is there likely to be format invariance across operating systems.

There is an implied obligation when offering help to offer "best help", which Hagar has done. That the recipient doesn't like the advice does not void that obligation.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30633
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Word docx file rendering incorrectly

Postby Hagar Delest » Wed Oct 31, 2012 9:14 am

Carlos Rocha wrote:OpenOffice is supposed to be able to open it. Ubuntu louds it http://www.ubuntu.com/ubuntu/features/office-applications

That's the problem when you claim something that will never be actually possible. The OOXML format has not been designed to be compatible with anything else than MS Office, period. See: MS Office 2007 OOXML file format (docx, xslx, pptx, ppsx).

Carlos Rocha wrote:Anyway, your answer is not really to help or "moderate". :shock:

The only real help for the user in such case is to use MS Office. AOO is not a free clone of MS Office. Personally, when I've to handle .doc/.docx/..., I use MS Office and that's all. The possibility of data loss because of a glitch in the import/export filters is a show stopper. Let alone the time that I would spend on re-formatting the documents.
The user is just facing the vendor lock-in policy that allowed MS Office to be a widely spread format: let the application be pirated too, so that all the users use the MS Office file formats and they are trapped. That's why true open standards is a key point for the future.
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28718
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Word docx file rendering incorrectly

Postby Carlos Rocha » Wed Oct 31, 2012 2:40 pm

Guys,

zmotiwala is trying to use OpenOffice/LibreOffice to get rid of MSOffice. Telling him to keep using MSOffice is not of any help, for him or for OpenOffice. You should be glad (as I am) when someone tries to move away from MSOffice, and try to be as helpful as possible to allow the move.

I'm with OpenOffice since the very beggining, by the time of Star Division, and it always tried to open and save MSOffice documents in the best possible way, so the reported issue is definitely a bug.
OpenOffice 3.4 on Windows 7
Carlos Rocha
 
Posts: 3
Joined: Thu Feb 02, 2012 9:35 pm

Re: Word docx file rendering incorrectly

Postby Hagar Delest » Wed Oct 31, 2012 3:25 pm

I can understand the need to read MS Office format.
But saving in MS Office format will not help the spread of ODF. The problem nowadays is proprietary formats like .doc/.docx. They are not suitable for interoperability. If you make applications that can save in such formats, do you believe that users will bother using something else like ODF?
The key point is not AOO or MSO, it's the file format. If MSO is a better application for the same format quality, then why not using it? We are not against MS Office by basic ideology.

At work, I would lose too much time to make sure that my files in MS Office formats are correctly rendered. I just can't agree with that. So I use AOO only for documents that I don't need to share with non AOO users.
Remember that users want something for real work, where time is money and where you can't lose time for such issues (I'm not talking about the few letters you have to print at home for personal things). In such case, perhaps the cost of MS Office is not that insignificant but in the long run, it's worth the time saving (and the troubles).
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28718
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Word docx file rendering incorrectly

Postby zmotiwala » Wed Oct 31, 2012 3:53 pm

Hello ,
The customer uses Microsoft Office 2007 to create these documents so I cannot control that. We need to convert these to a pdf file so it can be viewed in our web application. Open Office is wonderful and lets me do it.
The debate here is not whether I should use OO or MS Office. I am simply looking for a way to transfer over everything in my docx file to a pdf. I was hoping open office let me do that.

Open office has rich filter settings and I was wondering if there is something I could use to fix this issue.

So if you'll have any ideas that would help I would appreciate it.

Thank you!
Libre Office 5.2.5
Windows
zmotiwala
 
Posts: 41
Joined: Wed Dec 28, 2011 5:34 pm

Re: Word docx file rendering incorrectly

Postby Villeroy » Wed Oct 31, 2012 5:12 pm

It is technically impossible that any non-MS software will ever process this pestilence of a file format as perfectly as MS can do. This is the first reason why Microsoft bribed OOXML through the standardization boards. Second reason was fighting the ODF standard with something that has "Open", "Office" and "XML" in the name.

You need a software which is able to render any docx you throw at it perfectly well. This is the WinWord viewer which is downloadable for no money from the Microsoft Office site.
Secondly you need a virtual PDF printer which is a software that behaves like a physical printer and prints everything you throw at it into a PDF file instead of a sheet of paper. There are plenty of PDF printers availlable for the Microsoft Windows environment.
Finally you may even write a simple script which calls WordViewer.exe with a printer parameter for each *.docx in a given directory.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27881
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Word docx file rendering incorrectly

Postby ithinktfiam » Mon Jan 28, 2013 9:23 pm

There is no use flaming at "this pestilence of a file format." It is what MS uses and so what many companies use. Last computer I bought, five years ago, I tried OpenOffice and it didn't read MS well. I just bought a new rig and thought I'd try it again, yet in 2013 there's no save for docx in the basic save screen.

I work requires it, things I share between home and office therefore need it. It's sad when I come to the forums to find if there's any way to save to docx, even for simple files, and all I find is reasons why I can't use OpenOffice.
Windows 7, OpenOffice 3.1.0
ithinktfiam
 
Posts: 3
Joined: Mon Jan 28, 2013 9:15 pm

Re: Word docx file rendering incorrectly

Postby Hagar Delest » Mon Jan 28, 2013 10:34 pm

ithinktfiam wrote:There is no use flaming at "this pestilence of a file format."

But users need to be aware of that vendor lock-in policy!
If you need to use .docx, then use MS Office and that's all. This file format has not been designed to be compatible with anything else than MS Office. What do you think? That they will allow users to use another office suite so easily? But who would buy MS Office then?

The problem is in the file format itself, not in AOO able to save or not in OOXML!
That's why ODF has been created.
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28718
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Macros and UNO API

Who is online

Users browsing this forum: Google [Bot] and 9 guests