Are OpenOffice and LibreOffice compatible?

Discuss the word processor

Are OpenOffice and LibreOffice compatible?

Postby TAB » Wed Dec 11, 2019 12:40 am

OpenOffice cannot read (Read error) the attached .odt file written by LibreOffice. Why?
I understand some LibreOffice-specific features (such as comments) cannot be rendered exactly, like some MSWord features, but they should not cause such a drastic error. What is the point of the standard ‘odt’ format?
Attachments
ConvBsma.odt
(88.51 KiB) Downloaded 37 times
TAB
 
Posts: 282
Joined: Sun Feb 24, 2008 5:04 am

Re: are OpenOffice and LibreOffice compatible?

Postby RusselB » Wed Dec 11, 2019 3:43 am

Normally I would've said that they are mostly, if not completely compatible, however your file definitely shows an incompatibility.
I have checked the files inside the archive, and all of them appear to be good.
The file is recognized as an .odt file type, not just by extension name, so that's as expected also.
At this point, I have no explanation or suggestions. but I will keep working with the file to see what, if anything, I can find.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 6170
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: are OpenOffice and LibreOffice compatible?

Postby Bill » Wed Dec 11, 2019 6:46 am

It seems to be a problem with Image 1 and Image 2. I opened a copy of the file with LO and deleted Image 1 and Image 2, leaving the frames in place, then saved and closed the file. AOO opened the copy easily. I opened the original file with LO, then copied the Image 1 and Image 2 from the original in LO to the copy in AOO. After saving the copy it could be opened with both AOO and LO.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7926
Joined: Sat Nov 24, 2007 6:48 am

Re: are OpenOffice and LibreOffice compatible?

Postby Bill » Wed Dec 11, 2019 8:00 am

More testing. I opened the problem document with an archive manager and extracted the .emf picture files to the Desktop. I then opened the problem document with LO 6.3.2.2, deleted Image 1 and Image 2, leaving the frames, then inserted the previously extracted .emf files in the empty frames. No other changes were made to the document. After saving and closing the document, it opened successfully with both LO and AOO, leaving me to believe that this may be a problem with the particular version used to create the problem document.

Was the problem document created using LO 6.4.0.0 Beta? If so, this may be a bug that should to be reported.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7926
Joined: Sat Nov 24, 2007 6:48 am

Re: are OpenOffice and LibreOffice compatible?

Postby RoryOF » Wed Dec 11, 2019 10:45 am

Having been roused in the night by an emergency (all well, an external false alarm), I adopted a different approach to this problem. I opened a blank Writer file and used /File /Insert to insert the problem file; this seemed to succeed. Inspection of content.xml showed an (abnormal) number of styles, which I could not comprehend. I then went back to sleep.

 Edit: On later inspection I note that the opened file, opened by my method above, does not show all the figures. The emf and svm files would not load. They also would not load in any image editor I have currently installed. 
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31566
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Are OpenOffice and LibreOffice compatible?

Postby esperantisto » Wed Dec 11, 2019 1:24 pm

TAB wrote:What is the point of the standard ‘odt’ format?


The point of any standard format is to have all features standardized, obviously. The problem is that LibreOffice by default saves files to so called extended ODF, thus, not strictly to the standard format. I cannot, however, assert that this is the cause of the problem with the file in question.
AOO 4.2.0 / LibO 6.x/7.x / Win 7 / openSUSE Linux Leap 15.1 (64-bit)
esperantisto
Volunteer
 
Posts: 525
Joined: Mon Oct 08, 2007 1:31 am

Re: Are OpenOffice and LibreOffice compatible?

Postby Zizi64 » Wed Dec 11, 2019 2:00 pm

TAB wrote:
What is the point of the standard ‘odt’ format?




The point of any standard format is to have all features standardized, obviously. The problem is that LibreOffice by default saves files to so called extended ODF, thus, not strictly to the standard format. I cannot, however, assert that this is the cause of the problem with the file in question.


The ODF has some improved versions today: 1.0, 1.1, 1.2, 1.2 Extended. My LibreOffice6.1.6 uses the version "ODF1.2 Extended" by default.
And my portable Apache OpenOffice 4.1.5 uses the "ODF1.2 Extended" version too.

And your sample file opens in my LO, but it not open in my AOO.

Maybe you copy-pasted some strangely formatted content from some internet sites, or from a foreign format document.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9612
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Are OpenOffice and LibreOffice compatible?

Postby John_Ha » Wed Dec 11, 2019 2:31 pm

The images in Figure 4 and especially Figure 6 are causing the problem.

I get an error when opening it with AOO.

When i open the file with LibreOffice it is very unresponsive and scrolling is poor - the file jumps.

This simplest fix is to copy the images Figure 4 and Figure 6 into an image editor and then paste them back into the document so as to replace the original images with PNG images. This fixes the bad scrolling and the saved document now opens with AOO and scrolls properly.

See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer.

Unzipping shows the images are now PNG images and several redundant images have been deleted.

Clipboard04.gif

Also, the frame contain hyperlinks to a .grf file which I obviously don't have so it too may be causing a problem for the poster. It's \D1\D1Sin.grf in the \D1 folder below where the .odt is stored.

Clipboard01.gif
Clipboard01.gif (8.23 KiB) Viewed 951 times

TAB wrote:What is the point of the standard ‘odt’ format?

The .odt format is an ISO International Standard. It allows a document to be fully created even if you do not have a copy of AOO or LO because it is human readable and fully documented unlike so many Microsoft so called standards. See [Tutorial] Differences between Writer and MS Word files for a full discussion of its importance and for why you should always work in, and save files as, .odt. See especially Items 7, 8 and 9.

TAB wrote:I understand some LibreOffice-specific features (such as comments) cannot be rendered exactly, like some MSWord features, but they should not cause such a drastic error.

Read the above tutorial.

ConvBsma_new images.odt
(56.28 KiB) Downloaded 16 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7839
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Are OpenOffice and LibreOffice compatible?

Postby John_Ha » Wed Dec 11, 2019 4:22 pm

There is also a hidden frame which I cannot find.

Clipboard08.gif

Also, the frames have a link attached to them and so do the images inside those frames.

The Fig 4 frame has file:///C:/.../D1/D1SinUj.grf linked to it. GRF is a graph file format used by Microsoft GraphEdit. GRF files contain information about graphs created and edited in GraphEdit.

The Fig 4 Image has file:///C:/.../D1/D1SinUj.emf linked to it. EMF is a file extension for Enhanced MetaFile, a spool file format used in printing by the Windows operating system. When a print job is sent to the printer, if it is already printing another file, the computer reads the new file and stores it, usually on the hard disk or in memory, for printing at a later time.

Also the images are duplicated - there are images with transparency as well as that same image without transparency.

The SVM image is a vector drawing (the circuit diagram). It is also overlaid with its PNG equivalent.

My recommendation is therefore the third sentence in [Tutorial] Some useful hints on using images and is

It is far better to process your images in an image editor so that they are exactly how you want them to appear before inserting them into AOO.

Remove all images from the document and re-insert them as plain PNG files.

content.xml has the following code.

Clipboard02.gif
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7839
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Are OpenOffice and LibreOffice compatible?

Postby Bill » Thu Dec 12, 2019 2:56 pm

John_Ha wrote:Also, the frames have a link attached to them and so do the images inside those frames.

The Fig 4 frame has file:///C:/.../D1/D1SinUj.grf linked to it. GRF is a graph file format used by Microsoft GraphEdit. GRF files contain information about graphs created and edited in GraphEdit.

The Fig 4 Image has file:///C:/.../D1/D1SinUj.emf linked to it.

The links are relative links to local files that do not exist on my system. After opening the file with LO and deleting the links from Image1 and Image2, AOO could open the file without the read error. In my case, this appears to be the easiest solution to the problem.

John_Ha wrote:Also the images are duplicated - there are images with transparency as well as that same image without transparency.

This appears to be normal when graphic metafiles like .emf images are inserted in AOO and LO documents. Graphic metafiles contain both vector and bitmap components. When an .emf image is embedded in a document, It appears that AOO and LO add a PNG file containing the bitmap component.

John_Ha wrote:The SVM image is a vector drawing (the circuit diagram). It is also overlaid with its PNG equivalent.

My recommendation is therefore the third sentence in [Tutorial] Some useful hints on using images and is

It is far better to process your images in an image editor so that they are exactly how you want them to appear before inserting them into AOO.

Remove all images from the document and re-insert them as plain PNG files.

That would be useful to reduce the size of the document file, but the PNG files would produce lower quality images than the EMF files.

ConvBsma (1).odt
(95.16 KiB) Downloaded 18 times
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7926
Joined: Sat Nov 24, 2007 6:48 am

Re: Are OpenOffice and LibreOffice compatible?

Postby John_Ha » Thu Dec 12, 2019 8:30 pm

Bill

Good thinking. I can confirm that removing the links from the images in Figure 4 and Figure 6 (a total of two links) and saving the file allows it to be opened by AOO.

So we have a slightly strange occurrence. The two hyperlinks in the text body (D1e > file:///C:/Users/xxxxxx/Electronie/compos.odt#diodeIdéale and D1d > file:///C:/Users/John/Electronie/compos.odt#tensUj), and the three hyperlinks associated with each of the three frames don't cause AOO any problem even though they call for files I do not have. But the links associated with the images do cause AOO problems when the files they call are not available. That looks like a bug in AOO to me - if nothing else the file should still open and give a Read Error - graphic missing error.

Second, the user seems therefore to have requests for three images: the two already present as you describe and the third called by the hyperlink.

Bill wrote:That would be useful to reduce the size of the document file, but the PNG files would produce lower quality images than the EMF files.

I agree that vector graphics will retain quality as they are enlarged whereas raster graphics will eventually pixelate but this appears to be a printed book with pages so they will not be enlarged. If the PNG resolution is selected as described in the tutorial there will be no loss of quality as it will be determined by the printer dpi. Furthermore PNG circuit diagrams compress so well (all that white space compresses extremely well) that very high pixel count images could be used without the file size being large, and even more so if greyscale was used.
Attachments
ConvBsma(1)_no hyperlinks in images.odt
Hyperlinks removed only from images allows file to be opened by AOO
(85.56 KiB) Downloaded 20 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7839
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Are OpenOffice and LibreOffice compatible?

Postby Bill » Thu Dec 12, 2019 10:45 pm

John_Ha wrote:So we have a slightly strange occurrence. The two hyperlinks in the text body (D1e > file:///C:/Users/xxxxxx/Electronie/compos.odt#diodeIdéale and D1d > file:///C:/Users/John/Electronie/compos.odt#tensUj), and the three hyperlinks associated with each of the three frames don't cause AOO any problem even though they call for files I do not have. But the links associated with the images do cause AOO problems when the files they call are not available. That looks like a bug in AOO to me - if nothing else the file should still open and give a Read Error - graphic missing error.

I agree. I was wrong earlier when I said that AOO would add a PNG file when an EMF file was inserted in a document. A PNG file is added when inserting a SVG file, but not when inserting an EMF file. The file I uploaded has EMF files and PNG files because they were already in the file when it was opened by AOO writer. I have since found that if the file is modified and saved using AOO Writer, the EMF files become WMF files and the PNG files are deleted.

I made another test by creating a new LO Writer document with an EMF file and adding a link to a file which did exist on my system. This document also produced the read error when trying to open the document with AOO. I now believe that the availability of the linked file had nothing to do with the read error and that AOO changes the EMF images to WMF images because it does not fully support working with EMF images.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7926
Joined: Sat Nov 24, 2007 6:48 am


Return to Writer

Who is online

Users browsing this forum: No registered users and 24 guests