Ask Your Question
0

LibreOffice won't open Writer HTML file [closed]

asked 2014-03-09 17:20:23 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

One and only one local Writer HTML does not open with Writer. The file was created and used for over two years as a local page of a web site. Opera, Kompozer, Firefox, and Iceweasel will open the file. Writer will open all other local HTML files, generated with the same version of Writer. The file has been regenerated from scratch with older versions of Writer and with the latest version. The original file on the web site has been downloaded and Writer will not open it as a local file. Currently using Ubuntu 12.04 LTS, LibreOffice 4.2.2.1 420m0(Build:1). Also tried LibreOffice 4.1. Neither works. The code on the file starts with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>

... when opened with Opera, or Firefox. It is not critical to be answered because I can use source code to make changes when necessary. I would like to know why it won't open with Writer. Thanks for the answer.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 08:35:44.036220

Comments

addition: the local file starts with DOCTYPE HTML in both Opera and Firefos

rtrdom gravatar imagertrdom ( 2014-03-09 17:24:13 +0100 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2014-03-20 16:14:14 +0100

Otto- gravatar image

If you read the release notes of 4.2 there was added a function to embed images in html saved files. Read here https://wiki.documentfoundation.org/ReleaseNotes/4.2/de It seems now that this function is implemented for saving all html files. An effect that is not intended. If you have images linked, they will be embedded. Saved html file is much larger, contains the embedded images and a lot of code. So it cannot be opened anymore by lo-writer. Browsers are able to open but opening the file is very slow.

I have asked a smiliar question concerning the same issue here: http://ask.libreoffice.org/en/question/31382/how-to-deactivate-embedding-images-in-html-file-42/

But until now there is no answer. I concern it as a bug.

edit flag offensive delete link more

Comments

Not sure if it is related, but good point. Thanks.

oweng gravatar imageoweng ( 2014-03-21 00:56:44 +0100 )edit
0

answered 2014-03-10 01:24:57 +0100

oweng gravatar image

Is the DOCTYPE statement on the first line? It must be in order for Writer to correctly interpret the file. The only other thing I note is that the statement is missing the trailing "http://www.w3.org/TR/REC-html40/loose.dtd" DTD link reference. Example list of valid DOCTYPE statements can be found here.

edit flag offensive delete link more

Comments

The entire first line is shown in the first post as (). There is no http:// or loose.dtd. Perhaps the SAVE function has had a failure and cannot insert the appropriate code. To try to fix it, I removed each item on the index one at a time but it makes no difference.

rtrdom gravatar imagertrdom ( 2014-03-10 02:23:42 +0100 )edit

@rtrdom, you will need to surround the code examples in comments with backtick/grave marks as HTML notation tends to get eaten by the site comment handler.

oweng gravatar imageoweng ( 2014-03-12 13:10:25 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-09 17:20:23 +0100

Seen: 6,624 times

Last updated: Mar 20 '14