[Solved] Read error message in Writer

Discuss the word processor
Post Reply
ATHYNEA
Posts: 1
Joined: Thu Sep 21, 2017 3:40 pm

[Solved] Read error message in Writer

Post by ATHYNEA »

I have a long document and been working on it for months. Since yesterday i now can't open the file it says
Read error Format error discovered in the file in sub-document context.xml at 2,3198 (row, col)
i have searched the internet on ways to retrieve the file and have been able to retrieve half of it 64 pages via inserting it into a blank odt document. i have tried to repair the file to no avail. Does anyone know how i can retrieve the whole file please, as it is a really important document to me.
i don't know whether this makes any difference but i have been editing it in between word and open office writer.
Please help
many thanks Athynea
Last edited by Hagar Delest on Sun Sep 24, 2017 9:27 pm, edited 1 time in total.
Reason: tagged [Solved].
open office 4.3.1 windows 7
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: read error message in writer

Post by John_Ha »

Welcome to the forum.

See [Tutorial] Format error discovered in sub-document or email me the document for me to look at. I have sent you a message with my ID.
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: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: read error message in writer

Post by John_Ha »

ATHYNEA sent me the file. Using the method in [Tutorial] Format error discovered in sub-document I extracted content.xml which showed as below. There appear to be two problems:

1 The Chinese text seems wrong
2 The tags <svg:title/> and <svg:desc/>, where svg may be related to a Scalable Vector Graphic, did not have matching start? end? tags.

Code: Select all

... 
<draw:frame draw:z-index="251658240" draw:style-name="a0" draw:name="IMG_20151117_0003.jpg" text:anchor-type="paragraph" svg:x="0in" svg:y="0in" svg:width="5.94173in" svg:height="2.48189in" style:rel-width="scale" style:rel-height="scale">
	<draw:image xlink:href="media/image1.jpg" xlink:type=

 ... Chinese characters here which the board will not accept ... 
 
	-family-asian" xlink:show="embed" xlink:actuate="onLoad"/>
	<svg:title/>
	<svg:desc/>
</draw:frame>
...
I assumed that the frame encompassed the image, so I deleted everything from <draw:frame ... to </draw:frame> inclusive, which also deleted the unmatched svg tags, and the file then opened normally.

The problem may have arisen when an svg image was inserted and it somehow went wrong - note multiple references to svg in the XML. Whern I add an svg image in a test document it creates the following XML

Code: Select all

<draw:frame draw:style-name="fr1" draw:name="graphics1" text:anchor-type="paragraph" svg:width="170mm" svg:height="116.21mm" draw:z-index="0">
	<draw:image xlink:href="Pictures/10000201000003570000024954393FFA.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
	<draw:image xlink:href="../../../Documents/Software/RPI/pic.svg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="<All formats>"/>
</draw:frame>
If this solves the problem, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
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.
Post Reply