abhisheknair / keynote-nf

Automatically exported from code.google.com/p/keynote-nf
0 stars 0 forks source link

Out of memory opening a very big file #310

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using keynote 1.7.8 on windows XP. My keynote file is big : 1 go, with
many picture but it wasn't an issue before... Now when I try to open it a
message appears : "out of memory", and I can't open my file. I plan to cut
my file in more little ones but first I need to open it. Anyone can help?
Thanks

Original issue reported on code.google.com by ajean...@gmail.com on 12 May 2010 at 7:06

GoogleCodeExporter commented 9 years ago
Hello,
First I recommend you to divide the file in several ones, as you propone.
Also, remember that images in RTF (format used in KeyNote by default) occupies 
a lot
of space (you can see it in Word, e.g, comparing a document with images saved 
in .doc
vs .rtf). Actually KeyNote NF allows you to specify a new file format: "Keynote
compressed file". If you include many images in your .knt is very, very 
recommendable
to use that format.
To change to that format (or another one): File --> Properties --> Format
From "Settings" tab in that window you can change de compress level: 
Fastest/Default/Max

To get that big file opened try to close programs/processes to free memory, as 
much
as you can. There are other solutions but try this one first.

Regards
Daniel

Original comment by dpra...@gmail.com on 13 May 2010 at 10:20

GoogleCodeExporter commented 9 years ago
Indeed, saving in keynote compressed file allows to reduce a lot the size of 
the file !
I have not managed to open the big file even closing all the programs and 
cleaning
the memory with ccleaner... What are the others alternatives?
Usually when I use keynote for saving a book for instance, I insert a picture 
by note
so if my book has 50 pages I create 50 notes and 50 pictures (one by note). 
It's very
boring to insert one by one the pictures especially because everytime the 
format is
in bmp and I have to change this in gif because my pictures are in gif because 
bmp
takes too much space. Is there an option to automate the prossess  in order to
dispatch all at once 50 pictures in 50 notes ?
Regards,
Jean Luc

Original comment by ajean...@gmail.com on 15 May 2010 at 3:22

GoogleCodeExporter commented 9 years ago
Note that images in RTF are always saved as bitmap (bmp), and so to converting
previously to .gif will no reduce space. That's why I created the new file 
format,
compressed.

In relation to your problem with your big file. First make a backup of your 
file, for
example creating a .zip file (for your security).
Once you have your backup, create a copy of the file. Suppose you have then 
Big1.knt
and Big2.knt

Native format of KeyNote is plain text (ASCII) so you can try to open the file 
with a
program like notepad or notepad++, for example.

What you will see is something like I show you below (In 'Downloads' and in 
'Source'
you can find the description of the file format, but it is not necessary to 
know it
in detail for what we need here).
Notes begin with a line with '%' (plain notes) or '%+' (tree notes)
In Big1.knt you could delete all the notes until a certain note, and in 
Big2.knt you
could delete from that note until the final of the file. Or you could cut the 
text
corresponding to a selection of notes and paste them into a new file that you 
could
create first (just to have the basic structure).

I recommend you to try first with a little file created with two or three 
notes. Try
to decompose in two files.

Please, tell me if it works for you
Regards

#!GFKNT 2.0
# This is an automatically generated file. Do not edit.
#/
#?
#$0
#C19-09-2005 08:54:17
#^010000000000000000000000
%+
NN=My Tree Note
ID=5
.....
.....
%+
NN=My Second Tree Note
.....
.....
%
NN=My plain note
.....
.....
%%

We can reduce that file to:

#!GFKNT 2.0
# This is an automatically generated file. Do not edit.
#/
#?
#$0
#C19-09-2005 08:54:17
#^010000000000000000000000
%+
NN=My Second Tree Note
.....
.....
%%

Original comment by dpra...@gmail.com on 15 May 2010 at 8:26

GoogleCodeExporter commented 9 years ago
Did it work for you? Please, let me know

Thanks
Daniel

Original comment by dpra...@gmail.com on 26 May 2010 at 9:25

GoogleCodeExporter commented 9 years ago

Original comment by dpra...@gmail.com on 30 May 2010 at 4:10

GoogleCodeExporter commented 9 years ago
Well not really, here is the file opened with notepad++ (my file is to big to be
opened with notepad)

#!GFKNT 2.0
# This is an automatically generated file. Do not edit.
#/
#?
#$0
#C04-01-2010 15:00:57
#^011000000000000000000000
%+
NN=New note
ID=1
II=0
DC=04-01-2010 15:00:57
TI=0
TS=4
CX=37
CY=0
BG=clWindow
CH=1
FC=clWindowText
FN=MS Sans Serif
FS=8
LN=1036
ST=
FL=101110000000100000100000
SN=620
TW=270
EN=New node
TB=clWindow
TH=1
TC=clWindowText
TN=MS Sans Serif
TZ=8
TY=
%-
LV=0
ND=Traumato
DI=3
NF=000000000000000000000000
BC=clWindow
IX=0
NT=20100104T151247.20100104T180928
%:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil MS Sans Serif;}}
\viewkind4\uc1\pard\lang1036\f0\fs16\par
}
%-
LV=1
ND=Manoeuvres
DI=8
NF=000000100000000000000000
BC=clWindow
IX=0
NT=20100104T151644.20100202T163408
SS=288
%:
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans 
Serif;}{\f1\fnil MS
Sans Serif;}}
\viewkind4\uc1\pard\lang1036\f0\fs24 But des manoeuvres : augmenter la 
glissement :
il n'y a jamais de pb de roulement mais toujours de glissement, on travaille 
toujours
avec contre appui pour augmenter le glissement\par
Le glissement permet d'augmenter l'amplitude, il agit sur la capsule.\par
La d\'e9coaptation joue sur la sinoviale.\par
Le recentrage, contre appui se fait quelques degr\'e9s avant la fin de 
l'amplitude\par
\par
Les mouvement pendulaires ont une cadence de 270 par minute\par
\par
Assouplissement capsulaire\f1\fs16\par
}
%-
LV=2
ND=Hanche
DI=1147
NF=000000100000000000000000
BC=clWindow
IX=0
NT=20100201T140338.00000000T000000
%:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil MS Sans Serif;}}
\viewkind4\uc1\pard\lang1036\f0\fs16\par
}
%-
LV=3
ND=Décoaptation de la coxo fémorale dans l'axe du fut
DI=1148
NF=000000000000000000000000
BC=clWindow
IX=0
NT=20100201T140416.20100202T142739
SS=278
%:
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil MS Sans 
Serif;}{\f1\fnil\fcharset0 MS
Sans Serif;}}
\viewkind4\uc1\pard\lang1036\f0\fs16{\pict\wmetafile8\picw15079\pich10132\picwgo
al8549\pichgoal5744

010009000003e00005000000ca0005000000050000000b0200000000050000000c029427e73aca
000500430f2000cc0000007f013a02000000009427e73a00000000280000003a0200007f010000
010018000000000050010a00c40e0000c40e00000000000000000000e3e3e38b8b8b7f7f7f8b8b
8b8f8f8fd7d7d7ebebebdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfc3c3c31b1b1b0000000000003f3f
3f7f7f7f8c8c8cd4d4d4dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdf
dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfe3e3e3fbfbfbf2f2f2fbfbfbffffffffffffffffffffff
fffafafae2e2e2f0f0f0fafafaf3f3f3fffffffffffffffffffffffffffffffffffffafafae7e7
e7fcfcfcfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

(it continue like this the end : line 3394653, I gess the letters are some
translation of the pictures)

First of all after selecting the line I don't know what command delete them, I 
have
tried suppress or cut without success.

I have also tried another option : to increase the RAM of my laptop from 2 GO 
to 3
GO, but it doesn't help either and there is still a message "out of memory". 
What is
strange is that I managed to open a file of similar size. So 200 Mo more 
should't be
a problem especially after boosting the RAM.

Thanks for your help,
JL

Original comment by ajean...@gmail.com on 2 Jun 2010 at 6:06

GoogleCodeExporter commented 9 years ago
Hello again,
Can you check (using notepad++) if the file has blocks of text like 
\\\\\\\\.... (many \\\)?
There was a problem identified with issue #59, finally resolved, and I don't 
know
what version you have been using.

If you find that kind of block with so many "\\\" I would try to replace
"\\\\\\\\\\\\" to "\\\\\\" (12 to 6, or something similar in proportion), would 
save
(to reduce the file) and try the same several times.
Probably you could then open KeyNote NF with the command line option -clean 
(comented
in issue #59)

The letters you indicate correspond to images, you are right.

Also, I think it is easy to do what I recommeded to you, with notepad++, for 
example.
You can search for the X ocurrence of the following expresion '%\+$' (regular
expression, and without the ''). Now you presses ctr+shift+End to select from 
that
point to the end, and then presses Supr to delete that selection. That way you 
can
save a file (big1.knt). Repeat the same with the original file but pressing
ctr+shift+home to select from that point X to the beginning, holding Shift 
button and
going down a few lines deselecting those beginning with "#" and presses Supr. 
Save
the file (big2.knt)

Sorry if my english is so bad...

Original comment by dpra...@gmail.com on 2 Jun 2010 at 9:17

GoogleCodeExporter commented 9 years ago
Thanks, I have no \\\\\\\\\\\\ but a lot of :  ffffffffffffffffffffffffff...

I tried to do what you suggest me but on notepad++ but I have no clue about how 
to
suppress a line, when I select a line and press the button "supress" the line is
still there... Sorry but I have never used this software before. 

Original comment by ajean...@gmail.com on 2 Jun 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Good morning ajeanluc
I think the problem is that the file is marked as readonly. When the file is 
reaonly
Notepad++ don't let you modify it, and don't give you any warning (as I have 
just tested)

Original comment by dpra...@gmail.com on 3 Jun 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Thanks dpradov ! and to switch no normal mode what should I do ?

Original comment by ajean...@gmail.com on 3 Jun 2010 at 7:30

GoogleCodeExporter commented 9 years ago
From file explorer: right button click -> Properties -> Read only (checkbox)
From Notepad++: Edit -> Clear read only flag

Regards

Original comment by dpra...@gmail.com on 5 Jun 2010 at 7:39

GoogleCodeExporter commented 9 years ago
Well it's not in read only anymore but still impossible to cut suppress any 
line when
I select a line with the mouse, what the problem ??? The command find replace 
doesn't
work either...

Original comment by ajean...@gmail.com on 5 Jun 2010 at 5:48

GoogleCodeExporter commented 9 years ago
So.... No solution for this issue ???

Original comment by ajean...@gmail.com on 14 Jun 2010 at 2:37

GoogleCodeExporter commented 9 years ago
Hello, good news (I think)
I have looked for a program to split the file based on a pattern, and I have 
found one that is very, very good (and free): GSplit

You can download it from:

http://www.gdgsoft.com/gsplit/help/SplitByLinesOccurrences.htm
http://www.gdgsoft.com/download/gsplit.aspx

It is very ease.
Once you install (or unzip, depending on the edition you download) you launch 
the file GSplit.exe.
It will show you a help file. You can minimize it for now.
What you have to do is:
- Select the file to split: General-> 'Original File'
- Select the destination where to put the pieces: General->'Destination folder'
- Select, if you want, a mask for piece name: Pieces->'Filenames' (eg: 
part{num}.knt)
- Indicate that it must look for occurences of %+ (our tree notes). In Pieces-> 
'Type and Size'
    -> "Splite before the ocurrence number"  (before, not after..)
    -> 5   (or what you want. With 5 each piece will have 4 tree notes as max)
    -> of this pattern: "%+0x0D0x0A"  (without "". 0x0D0x0A is for the carrier return and line feed)
- In Pieces -> 'Other properties' -> 'Tags and Header' select the following 
options:
   - Do not add GSplit tags to piece files
   - Insert additional header to pieces
     -> Copy all the data prior to the first occurrence or line

And that's it!
Now you click on General -> Split File

I have tried it with a .knt file and all the pieces are ok.
Good luck!

Original comment by dpra...@gmail.com on 14 Jun 2010 at 5:14

GoogleCodeExporter commented 9 years ago
Thanks a lot. I followed your instructions but here is what happened : first if 
you check the copy paste I did above, you can notice that I have only one %+, 
so it is possible to use this occurence, I have tried to use %- but I get 742 
files, and when I open one of this file with keynote I notice that some of them 
seem totally empty (even a file that weight 29 Mo : there is nothing : no text, 
no pictures, inside, no notes...) So I don't understand why it appears empty if 
it weights 29 Mo). There is some files also with pictures and text and some 
empty files. So please let me know what do you think about it.

Original comment by ajean...@gmail.com on 15 Jun 2010 at 4:39

GoogleCodeExporter commented 9 years ago
The example you pasted was that, an example, a little piece of the file. In 
that case it begins with a multi-level tree.
Is it possible that you have multiple notes but all of them except one is a 
standard rich text note?
If that is the case then you should look for the pattern "%0x0D0x0A" (remember, 
without the "")
If you use %- you are getting a file for each node, but without the preamble 
corresponding to its note. When KeyNote opens such kind of file it recognizes 
as a Keynote file but, as it doesn't find the beginning of a note simply 
ignores that nodes.
I hope that it works for you now.

Original comment by dpra...@gmail.com on 15 Jun 2010 at 8:25

GoogleCodeExporter commented 9 years ago
Actually the copy paste is the beginning and main part of my file as it appears 
in notepad+. After I have also 3340000 others lines but full of letters and 
numbers like : 
"4743483a39433a39433a39433531383531383a39433a3943423c444743484537394743484c51
5a4743483531383d41503a3943353138423c444e504c423c443a39434743483a3943353138423c
443a39433a39433a3943474348423c445548493d41503531385853599aa3b3554849", (without 
%+ or whatsever).
I have tried to split my file with the pattern : %0x0D0x0A but Gsplit can't 
find this pattern...
Do you think that my file is corrupted or what's the problem? Perharps I should 
improve again the RAM of my PC (now 3 G) to 4 or more to finally be able to 
open it because the problem seems unsolvable...

Original comment by ajean...@gmail.com on 17 Jun 2010 at 4:04

GoogleCodeExporter commented 9 years ago
Hello again
If you got 742 files searching for "%-0x0D0x0A" then, if you used the value '5' 
as I suggested you (split before the 5º ocurrence..), that means that you have 
742*5= 3710 nodes (all in one tree note?)
I would try to repeat with that pattern but with a bigger number, like 1500, so 
that the file will be truncated into 3 or 4 pieces. And it is very important 
that you follow my instructions:
    -> "Split before the ocurrence number"  (***before***, not after..)
    -> 1500   (--> each piece will have 1499 nodes as max)
- In Pieces -> 'Other properties' -> 'Tags and Header' select the following 
options:
   -** Do not add GSplit tags to piece files
   -** Insert additional header to pieces
     ->** Copy all the data prior to the first occurrence or line

In this way all the nodes you can have will be offered in each file as belonged 
to the first note I can see from the selection you pasted. That is, all files 
will begin with:

#!GFKNT 2.0
# This is an automatically generated file. Do not edit.
#/
#?
#$0
#C04-01-2010 15:00:57
#^011000000000000000000000
%+
NN=New note
ID=1
II=0
DC=04-01-2010 15:00:57
TI=0
TS=4
CX=37
CY=0
BG=clWindow
CH=1
FC=clWindowText
FN=MS Sans Serif
FS=8
LN=1036
ST=
FL=101110000000100000100000
SN=620
TW=270
EN=New node
TB=clWindow
TH=1
TC=clWindowText
TN=MS Sans Serif
TZ=8
TY=
%-

If ALL the lines are full with letters and numbers like you pasted then the 
file will be corrupted, but I don't think so, because you have encountered a 
lot of nodes (lines of the form: 
%-
)
I think that you have a lot of very big images, simply.

The content of a node begins with "%:" and if it is RTF (Rich Text Format) then 
will be followed with "{\rtf1\....." exactly as it appears in what you pasted:
%:
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil MS Sans 
Serif;}{\f1\fnil\fcharset0 MS
Sans Serif;}}
\viewkind4\uc1\pard\lang1036\f0\fs16{\pict\wmetafile8\picw15079\pich10132\picwgo
al8549\pichgoal5744

010009000003e00005000000ca0005000000050000000b0200000000050000000c029427e73aca
000500430f2000cc0000007f013a02000000009427e73a00000000280000003a0200007f010000
0.....

Efectively that letters and numbers correspond to an image.

If you want, and if you conserve one of that 742 files, at least one of them 
will be little. Compress it with zip (best compression) and send me that file 
to the email that appears in KeyNote NF (dprado.keynote@...). Probably, I will 
be able to tell you what is happening.
If you have private data then before send me the file look inside of that 
little file with Notepad++ to make sure you don't send me nothing you shouldn't.

Original comment by dpra...@gmail.com on 17 Jun 2010 at 8:04

GoogleCodeExporter commented 9 years ago
Thanks a lot for your help because finally it works !!! I have splited before 
300 because before I have used 2 and not 5 the first time (when I get the 742 
files). So now I have 3 files that I can read and open with keynote without pb. 
The greater part of the pictures is there but it seams, that sometimes some 
pictures have disappeared. I am not 100 % sure about that because there is a 
lot of notes and I don't remember exactly each one and some images were in 
different format : bmp, gif ... I think now that I have my files I can import 
notes from one file to another to create a more logical spliting. I will send 
you also one of my 742 files (there is nothing confidential) so you 'll can 
have a look.

Original comment by ajean...@gmail.com on 19 Jun 2010 at 3:26

GoogleCodeExporter commented 9 years ago
Hello ajeanluc
Congratulations, finally you got it!
Don't forget this time to create backups of your .knt file, and besides to 
split it in some logical way. Try to reduce the file size with the new format 
(compress).
With KeyNote you can create backups when you save, but also I would create 
backups periodically in another folder. You can even use programs like SyncBack 
(there is a free edition) or similar.
Regards
Daniel

Original comment by dpra...@gmail.com on 19 Jun 2010 at 6:38