I used 2 fonts, Ubuntu (Regular) and Century Gothic , All texts are written in greek.
My deadline for this project is tommorow night and i hope we will find a solution to recover the texts, or at least a solution on how to decode the rtf coded text
To play around with it on Mac, I open TextEdit (you can open whatever platform editor you want, just save as .rtf), type something, save in .rtf, then open with vim or emacs or whatever editor and see what you get.
There’s no “Normal” plain text in what you pasted - that’s all just font setup.
Hello Barry
I made exactly what you said with Microsoft word, and i had interesting result.
I wrote a sentence in english in Ubuntu (The white house on the mountain.)
And below it i wrote the same sentence in greek and in Century Gothic (Το άσπρο σπίτι στο βουνό.)
(These are the 2 fonts i used in my crashed LayOut document)
This is the doc (that i saved in rtf) that i made in Word and then i opened it (and copy to new notepad->stored) in Notepad to see how is actually the code look like->
These are all the pages in xml format that i recover with the unziping magic from the crashed LayOut file → Dropbox - Error
Barry,if you can, check please some random of them to see what you get… There must be encoded text inside, it couldnt just get lost from all pages (when all the images are fully recovered), its just not making sense.
And something else, Barry,as you are a SketchUp Team member, dont you have any special technique or tools to recover the crashed layout file??
here it is → Dropbox - Error
( i wrote the whole description what happened and what is inside in the first posts of this topic)
On the Mac, I did open -e /tmp/foo.rtf, and it looke like this, but with centered text:
88
It’s worth noting that in an rtf file, a program will do it’s best to font substitute. The Mac does it more or less automatically, the PC… sometimes needed help in LayOut in the past, it’s probably better now than it was. On my Mac, the Ubuntu font was replaced with Helvetica.
On page8.xml, there are 8 of those. Write out all 8 and you have all of your text.
If it were me, I’d write a little python script, or dig around the existing RTF files you have written out, and you’ll have all the text. Do you have ANY backups of this file? It’s such a huge file to deal with… once it gets corrupted, it’s not easy to deal with.
I dont have any Mac s closeby (friends or collegues) to check exactly your 1 and 2 steps…(and also i am not understanding the /tmp/foo.rtf -its a somekind of path? what is tmp? )…thats why i contacted some IT friends that i hope they can write a python script, they were trying also to solve it and i just show them your answer-insight…
Yes, my layout is setted to make backups every 10 min, but even the back up of the base file is corrupted. (The main file is mentioned as a link on my previus post)
And unfortunately i didn’t made an earlier version saving ( i mean to make save a Layout like FileV1.layout, FileV2.layout, as you go further)
I the case my collegues couldnt write this magic script,
I am totaly ok to dig around each existing rtf file to get all my text,step by step,these textes are very precius for me so i dont care about any kind of ‘‘donkey work’’ it will take to get it, i will do it…
Is there any solution for Windows??? (My os is windows10)
Steps 1 & 2 I just looked at page8.xml in the DropBox web browser, but you’ll have those on your system. You’ll just extract everything in between the <e:rtfTextRep> and </e:rtfTextRep> tags. The hard part will be, you need this files to be referenced with the right reference id in the references.xml file. Every model, rtf file, etc… will be referenced in there.
What I’d do is extract all the text and try to recreate the file by seeing what text was on that page, rather than trying to match up reference id’s, because there will be so many of them.
In python, you could just open up the entire page and read it in (call it “page”), then:
rtf_segment = page.split(‘<e:rtfTextRep>’) # but keep just the odd numbered
the first split will give you everything after <e:rtfTextRep> until the next <e:rtfTextRep>, so the odd numbers (1, 3, 5, 7…) will contain the text you want, but too much, so the second split
Haha… remember, RTF, around 1987, preceded HTML, around 1991, and I got to watch NeXT use both, since they added “hypertext” to RTF docs, then Tim Berners-Lee doing the first web browser on NeXT. but I digress…
A HUGE Thank You to everyone who tried to solve my problem and helped me !!!
A GREAT friend of mine wrote a script, made some magic and restored all the precius text !
I am very happy to see a great comunity here that are ready to help and to have such great friends!
The script that my friend created was just only replacing each coded letter with its greek original input letter.
We get the ‘‘equals’’ through exporting all the letters from the greek alphabet in the encoded xml version by making the zip-unzip magic with a simple LayOut document.
The guys from the support team replied to me today and i am pasting their exact answer:
''Hi Dimitris,
Thanks for your note. I spoke with one of our engineers, he had some steps that you could follow to recover the file:
here is a labor-intensive but semi-reasonable way for this guy to recover his text if he really wants it.
The basic strategy is this:
Create a layout file with a text box in it and nothing else.
One at a time, copy the content of the text boxes from the
original document into this new document, zip up the file, open it in
LayOut, and view the text.
(As an optimization, he could create multiple text boxes in this new
document and effectively do this in batches, but I’m going to write the
one-at-a-time method.)
Here are the steps to set up this process:
Unzip the original file into a temporary folder. We will be
extracting information from the xml files inside the “pages”
subdirectory.
Create a new layout file, and create a single text box in the
middle of the page. Save this file (I’ll call it onepage.layout).
Unzip onepage.layout into a different temporary folder.
Repeat this process for every text box that’s worth saving:
Using a text editor, open one of the .xml files inside the “pages” directory from the original file.
Look for a long section of text that starts with
“<e:rtfTextRep>” and end with “</e:rtfTextRep>”, select it
in the editor, and COPY it.
Using a text editor, open the .xml file inside the “pages” directory that we unzipped from onepage.layout.
Find the existing <e:rtfTextRep> section, and PASTE the value from step #2 over the existing section.
Save the file and exit the text editor.
Zip the files back into a layout file (on a mac, I’m using this command “zip -r fixed.layout *”.
Open the file from step 6 in LayOut and you should see your text on the page.
I dont know why he get only question marks, i was doing the same tries when i was searching a solution (before i finaly solve it) and get also nosense letters like question marks.