If I'm getting into hacking the contents, I usually first use emacs

M-x query-replace-regular-expression \(<\([^/][^>]\)*/> C-q C-j \1 C-q C-j

and

M-x query-replace-regular-expression \(<\([^ ]+\) .*</\2[^>]+>\) C-q C-j \1 C-q C-j

to break things up a bit. The first replacement puts each "self-terminated" element on a line by itself.

The second chunks <something.....</somthing...> onto their own lines.

I don't know what frames look like (and I don't feel like experimenting right now :) but if you have a specific form, you might be able to automatically cut all frames away using regular-expression replacement. The XML is very regular.

HTH,
Donald.

Pete Holsberg wrote:
CPHennessy typed the following on 6/25/2006 4:15 AM:

On Sat June 24 2006 16:21, Pete Holsberg wrote:

The OCR program ReadIris has provided me with a set of
"frames-rich" files as a result of scanning a document.

I would like to create a single frameless document for editing,
exporting to PDF, etc. but am unable to do it.

How does one remove frames without losing the contents?


Hi Pete,
  If you are comfortable with some "hacking" you have 2 options :
1) write a macro 2) save the file in ODT format (turning off the "Size optimisation for XML" option in "Tools" -> "Options" -> "Load/Save" -> "General", then unzipping the ODT file, and edit the contents.xml file to remove the frame elements. You will of course have to re-zip the files to edit the document in OOo again.


1) Maybe I'll try writing a macro.
2) contents.xml has but two lines in it -- i.e., no form at all. Very difficult to pick out the tags. Also, it looks like the text is not in order!! Each frame has a name and they must somehow be linked or use pointers!!

So how come Writer lets you insert frames/boxen but doesn't let you say "Ooops!"???


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to