[Solved] Paste one figure shows 1000 times

Discuss the word processor
Post Reply
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

[Solved] Paste one figure shows 1000 times

Post by benlev@aol.com »

This is driving me nuts. It has happened several times. I'm writing a basic report and paste a figure onto the page. A few minutes later while typing everything slows down and crashes. I recover the document and I'll notice that the figure is shown as Figure 1000 or something when I only have 3 figures in the document. I go and generate a Table of Figures and see that I have over 1000 figures in my document. It seems that about 1000 figures have been pasted into the same spot. I can delete and delete to fix it but it often is easier to start over

Any one seen this? I'm on Windows 10 (Ok that's halff the problem) and using the most current OO.

Thank you.
Last edited by benlev@aol.com on Wed Jan 17, 2018 8:31 pm, edited 2 times in total.
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste one figure shows 1000 times

Post by John_Ha »

See Re: Unable to Delete Picture which seems similar.

What is the history of the file? Has it ever been saved as a .odt file by MS Word?
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.
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Figures Paste 100's of times

Post by benlev@aol.com »

Persistent problem. This is driving me crazy. I write technical reports and there are usually about ten figures within the report. I usually use "Insert Picture" and select a figure that is saved in JPEG, or I simply use a screen clipping program ("Snipping Tool" in Windows 10) to take a screenshot and paste it into the document.

A few hours into the writing Writer slows to a crawl and then stops and crashes. I recover the document and start again. When I look at the "Table of Figures" I notice that one of my figures is shown to exist 130 times or more. For example, the figure, "Map of Area" which is supposed to be Figure 4, is listed 130 times as Figure 4, Figure 5, Figure 6 etc.

If I go to the page with Figure 4 and delete it, but there is another copy of that figure under it. And if you delete that one, there are 128 more copies of that figure under it.

I don't know what causes this. I now save every time I add a figure. Once this happens the document just constantly crashes so I go to one of my back up copies and start again. It's driving me nuts. What could be causing this?

A few things I've tried:

1. When I have a figure, it seems to be OK it it is "Tied to Paragraph" instead of "Treat like Character".
2. I am avoiding "Paste" and instead I'm saving Screenshots as "JPG" and then using "Insert Picture". This seems to help.

Once the document starts to crash there is nothing I can do to recover it.

Has anyone seen this? I'm at the point of quitting Open Office and sucking it up with Microsoft Word.

Thank you,

Ben
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
User avatar
robleyd
Moderator
Posts: 5056
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Figures Paste 100's of times

Post by robleyd »

You are regularly saving as you work - in what format are you saving your documents?
Have you seen [Tutorial] Some useful hints on using images ? There may be something helpful for you in it.
 Edit: Merged with your previous question on the same topic [robleyd - moderator] 
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Paste one figure shows 1000 times

Post by Zizi64 »

Without your ODF type sample file we can guessing only.

Maybe
- your PC is too old or slow.
- the memory size of your PC is too small.
- the memory settings for the pictures in your AOO is inappropriate. (Tools - Options - Open/LibreOffice - Memory)
- your pictures was not optimized before you embedded into the document.


Please share your sample document.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste one figure shows 1000 times

Post by John_Ha »

Did you read Re: Unable to Delete Picture which seems to be the same problem? If you did read it, you now know how to fix it.
Zizi64 wrote:Without your ODF type sample file we can guessing only ... Please share your sample document.
+1. If you cannot work out how to fix it then upload the file because it cannot be fixed without editing content.xml.
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.
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Re: Paste one figure shows 1000 times

Post by benlev@aol.com »

Here is a link to the file. I am reading all of these suggestions. This file is a template that I use repeatedly. Maybe it was once opened in Microsoft Word and this caused the on-going problem?

https://www.dropbox.com/s/w6o9qs9j2mrpi ... 9.odt?dl=0
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Paste one figure shows 1000 times

Post by Zizi64 »

Maybe it was once opened in Microsoft Word and this caused the on-going problem?
Have you a previous version of your document what was not edited with a foreign Office suite?

(Always create more than one backup copy about your important documents.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste one figure shows 1000 times

Post by John_Ha »

As you can see Navigator shows there are hundreds and hundreds of repeated frame definitions in the document which should not be there. I do not know why they are greyed out. They include the text "Relevant Locations - Araiza Matter". I deleted them from content.xml and the repaired file is download here.
Clipboard01.png

Code: Select all

<draw:frame draw:style-name="fr6" draw:name="Frame21" text:anchor-type="paragraph" svg:width="6.7307in" draw:z-index="0">
	<draw:text-box fo:min-height="3.2846in">
	<text:p text:style-name="Figure">
		<draw:frame draw:style-name="fr7" draw:name="graphics41" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.0626in" style:rel-height="scale" draw:z-index="0">
			<draw:image xlink:href="Pictures/10000000000002DC0000014FDDEABCAC.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
		</draw:frame>Figure <text:sequence text:ref-name="refFigure678" text:name="Figure" text:formula="ooow:Figure+1" style:num-format="1">12</text:sequence>: Relevant Locations - Araiza Matter</text:p>
	</draw:text-box>
</draw:frame>
<draw:frame draw:style-name="fr6" draw:name="Frame2" text:anchor-type="paragraph" svg:width="6.7307in" draw:z-index="0">
	<draw:text-box fo:min-height="3.2846in">
	<text:p text:style-name="Figure">
		<draw:frame draw:style-name="fr7" draw:name="graphics4" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.0626in" style:rel-height="scale" draw:z-index="0">
			<draw:image xlink:href="Pictures/10000000000002DC0000014FDDEABCAC.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
		</draw:frame>Figure <text:sequence text:ref-name="refFigure679" text:name="Figure" text:formula="ooow:Figure+1" style:num-format="1">11</text:sequence>: Relevant Locations - Araiza Matter</text:p>
</draw:text-box>
</draw:frame>
<draw:frame draw:style-name="fr6" draw:name="Frame21" text:anchor-type="paragraph" svg:width="6.7307in" draw:z-index="0">
	<draw:text-box fo:min-height="3.2846in">
	<text:p text:style-name="Figure">
		<draw:frame draw:style-name="fr7" draw:name="graphics41" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.0626in" style:rel-height="scale" draw:z-index="0">
			<draw:image xlink:href="Pictures/10000000000002DC0000014FDDEABCAC.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
		</draw:frame>Figure <text:sequence text:ref-name="refFigure680" text:name="Figure" text:formula="ooow:Figure+1" style:num-format="1">10</text:sequence>: Relevant Locations - Araiza Matter</text:p>
	</draw:text-box>
</draw:frame>
<draw:frame draw:style-name="fr6" draw:name="Frame2" text:anchor-type="paragraph" svg:width="6.7307in" draw:z-index="0">
	<draw:text-box fo:min-height="3.2846in">
	<text:p text:style-name="Figure">
		<draw:frame draw:style-name="fr7" draw:name="graphics4" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.0626in" style:rel-height="scale" draw:z-index="0">
			<draw:image xlink:href="Pictures/10000000000002DC0000014FDDEABCAC.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
		</draw:frame>Figure <text:sequence text:ref-name="refFigure681" text:name="Figure" text:formula="ooow:Figure+1" style:num-format="1">9</text:sequence>: Relevant Locations - Araiza Matter</text:p>
	</draw:text-box>
</draw:frame>
Be aware that I may have deleted some of your content as well as redundant frames.

The frame definition includes <draw:text-box fo:min-height="3.2846in"> which could be an MS Word Textbox, which AOO does not handle (See [Tutorial] Differences between Writer and MS Word files). However, if so, I think they should be deleted on saving the file as "unrecognised XML tags". The numbering of the frames - 2, 21, 210, 2100, 2101, 2102, ..., 2109, 211, 2110, 21100, 21101, etc - is consistent with other similar reports noted above.

A "Writer Draw Rectangle" with text Fred inside is defined as a Draw Rectangle as here:

Code: Select all

<draw:rect text:anchor-type="paragraph" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="82.29mm" svg:height="39.7mm" svg:x="22.82mm" svg:y="22.9mm">
	<text:p text:style-name="P1">Fred </text:p>
</draw:rect>
If your problem is solved 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.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste one figure shows 1000 times

Post by John_Ha »

One more point.
benlev@aol.com wrote:I usually use "Insert Picture" and select a figure that is saved in JPEG
Never use a JPG for a graphic, especially one which contains text or sharp edges. JPG should only be used for photos.

If you use JPG for graphics then you get blotches, artefacts and edges get blurred making text difficult to read. See [Tutorial] Some useful hints on using images for a discussion.

One more more point. You are right to use a template for this because a file which is heavily edited can become "tangled".

Also I don't know why the repaired file is still taking a long time to load - about eight seconds - during which the frame labels in Navigator are greyed out.
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.
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Re: Paste one figure shows 1000 times

Post by benlev@aol.com »

Thank you. I did not know not to use JPEG for graphics. What is the best format?
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Re: Paste one figure shows 1000 times

Post by benlev@aol.com »

Thank you for the repair! I will check it now. I am not worried if the content was lost and I appreciate it. I will check it now. I don't understand all the details but I will re-read your post carefully.
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Re: Paste one figure shows 1000 times

Post by benlev@aol.com »

I have looked at the repaired file. I think the "hundreds of frames" may be the line numbers I placed on the side. There should be one per page, not hundreds. I have attached a PDF of what the final document looked like. I was able to recover it a number of times and print it as PDF.

https://www.dropbox.com/s/1qf2my899uep1 ... z.pdf?dl=0

For each page, after the cover page and table of contents, there are line numbers on the left side of the page. The line numbers normally used in Writer cannot be used because they will only allow 1 number per line, so if a figure is on the page it will be a line number by itself. In these reports, the line numbers must be evenly spaced and run the length of the page. (Because people want to refer to something in a drawing they may say "Look at Line Number 15" and this location will be in the middle of a figure. Then Line 2 may be another part of the figure.)

I have been able to use line numbers by creating a long skinny text box on the left side of the page and entering numbers from 1 to 32 in that box with carriage returns between the numbers. This has worked well in the past. Maybe when it was opened by Microsoft a problem occurred?

I have tried an alternate method of creating line numbers. I created a watermark that was a list of numbers but I am not able to make this watermark large enough or get it to the right position on the page.

Thank you for the excellent help so far.
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste one figure shows 1000 times

Post by John_Ha »

benlev@aol.com wrote:Thank you. I did not know not to use JPEG for graphics. What is the best format?
Any lossless compression such as PNG (which I use) or GIF (only 256 colours). JPG is a lossy compression. See [Tutorial] Differences between Writer and MS Word files for why.
benlev@aol.com wrote:I have looked at the repaired file. I think the "hundreds of frames" may be the line numbers I placed on the side. There should be one per page, not hundreds.
I doubt it. The many frame definitions were not intentionally added by anyone - they were added because of a fault in whichever software was editing the file, and the software added them. We have had reports of MS Word doing it - I do not think it was AOO which did it.

AOO can add line numbers. Go Help and search on line numbers. Tools > Line numbers ...

You can stretch your watermark image to extend over the entire page.

Your document seems over complex - is there a good reason for having the multiple sections? They are not a problem.
Attachments
Clipboard.png
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: Paste one figure shows 1000 times

Post by John_Ha »

There are many tricks for numbers.
Add an image as a Page Background (Format > Page > Background ...)
Add a long, thin image down the left side. You may be able to anchor it to a header or footer and it should then appear on every page with that header / footer.
Add a long, thin frame with the numbers. This is probably better than adding a text box.
Use an ink-jet printer to pre-print line numbers on blank sheets of paper, and then print the document. If you use a laser printer there is the possibility the heating on the second pass will life the previously printed items and contaminate the roller.
Most printers allow you to define a watermark image which will then underlay what you print.
Add a "watermark" background image to the document - see Re: Watermark based on Paper format not margins
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: Paste one figure shows 1000 times

Post by John_Ha »

benlev@aol.com wrote:The line numbers normally used in Writer cannot be used because they will only allow 1 number per line, so if a figure is on the page it will be a line number by itself.
This setting seems to work well, where the images are uniquely defined as being "between lines 13 and 14", or "between lines 22 and 23". It is better to use Writer line numbers because, if you use your own (by a background image for example) they will not line up with the lines unless you take exceptional care with sizing your image inserts to be "exactly integer number of line heights" high. You could add numbers for pictures in a thin frame to the left (and above as well??) the picture. Or add a grid over the image as a map - "see square Ce".

Also right-click each frame > Frame > Wrap ..., and set Spacing > Top / Bottom to, say, 0.1". This gives a gap to separate the frame from the text above / below without adding a new line. Similarly click inside a paragraph and go Format > Paragraph > Indent and spacings ... Now set Spacing above and below ..., so as to establish a gap without needing a empty paragraph.
Clipboard05.png
Clipboard04.png
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.
benlev@aol.com
Posts: 30
Joined: Mon Sep 28, 2009 7:00 pm

Re: [NOT Solved] Paste one figure shows 1000 times

Post by benlev@aol.com »

This problem has not gone away. I have saved a document with no figures and added only my signature. I pasted the signature and it exists in the document hundreds of times. How do I fix this myself? I see that you are able to look at code and remove things. How do I access that?

I have become afraid to use Open Office now. I certainly don't want to switch to MS. What is the problem here. It's only a problem on documents with figures.

Thank you,
Ben
Attachments
Draft_Preliminary_Explerts_Report_of_Ben_Levitan_re_Exact_Valve.odt
(61.14 KiB) Downloaded 277 times
ben levitan / mobile phone forensics / openoffice 4.1.5 on windows 10
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Paste one figure shows 1000 times

Post by Bill »

Please update your signature. Someone reading your last post for the first time would be misled to believe that you were having a problem with an obsolete version of OOo in an obsolete operating system.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Paste one figure shows 1000 times

Post by RoryOF »

Have you tried /Insert /Picture : from file instead of Pasting the signature?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Paste one figure shows 1000 times

Post by John_Ha »

I think I know how the problem has arisen.

You have Edit > Changes > Record ..., ticked.

This means you are recording every edit you make to the document. The document has become hopelessly tangled with a multiplicity of changes being applied every time the document is opened. This cripples the performance.

I don't know why you have so many graphics or why so many areblank greyed out in Navigator.

I don't know how to fix it but I will try ...
Last edited by John_Ha on Wed Jan 17, 2018 1:42 am, edited 1 time in total.
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: [Solved] Paste one figure shows 1000 times

Post by John_Ha »

Have a look at repaired.ott. ***

It seems OK to me but I don't know the original document well enough so it will need checking and maybe tidying up. I deleted the signature - you need to add it back.

What did I do? I edited content.xml to delete every frame - there were hundreds of them and each had a graphic. I also deleted bits of xml which seemed to be saying "this is a recorded change". Then, when I opened the file again, I set Edit > Changes > Record to OFF. Somehow I also lost all the contents of the fields with defendant's name etc. I saved it as a template file repaired.oTt.

What do you need to do?

1 Check nothing else has gone. Check the formatting.
2 Create a new signature image and, this time, save it as a PNG file when you scan it and not as a JPG! It will be much better quality.
3 Save the file with the image as a TEMPLATE (File > Save As ..., and choose .ott from the list of file types).

*** Why did I save it as a template file repaired.ott?

When you open a template called Master.ott for editing, AOO creates a copy of Master.ott but it is as though it is a new document because it is named Untitled 1.odt. When you save the document, you automatically save it as a .odt file and you have to give it a name, so you save it as, say, Fred.odt. This way, the document Master.ott is hardly ever edited - it remains pristine and clean however many copies you make of it. You can place the template in the Templates folder C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\template\ and it can then be accessed by File > New > Templates and Documents.

If you want to make a change to the template Master.ott, you open it as usual, and then Save As. ..., and now select Save as type ..., and choose .ott. Save it as Master.ott.

See Chapter 10 - Working with Templates in the Writer Manual.
Clipboard02.gif
repaired.ott
(39 KiB) Downloaded 220 times
If your problem is solved 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.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [NOT Solved] Paste one figure shows 1000 times

Post by John_Ha »

benlev@aol.com wrote:How do I fix this myself? I see that you are able to look at code and remove things. How do I access that?
Do so at your own risk and only on a copy of the file.

It is not a supported way of working with AOO (which means no-one can help you if it goes wrong, and there is no documentation) ... but it can be very useful.

1. Download Notepad++ and the XML Tools plug in.
2. Unzip the .odt file (It is called .odt but it is a zip file!) and extract content.xml.
3. Open content.xml with Notepad++. Go Plugins > XML Tools > Pretty print with line breaks.

Now do the editing. Basically, XML tags cpome in pairs as <fred> lots of stuff which could include other tags like <tom> other stuff </tom> more stuff </fred> or <harry: some stuff /> so be careful always to delete a "matching pair with the content inbetween them".

4. When finished, Plugins > XML Tools > Linearise XML.
5. Save content.xml and put it back in the zip file.

See [Tutorial] Format error discovered in sub-document and [Tutorial] How to fix SAXParse errors in LibreOffice files for more information.
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