03-21-2011, 07:02 AM | #1 |
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Calibre emptying pdf files
First of all: I didn't find a Calibre bug/problem dedicated category, so I´m posting here and yes, I searched!
Hi everybody, I´m adding a huge PDF library of scientific books to calibre in order to attach metadata and to organise the Jungle on my machine. I´m running MacOsx 10.6.6 and Calibre. Since a lot of the file are poorly optimize-scan, after addition to calibre I started to optimize some of that. I'm running AdobePro9 scanned file optimization, OCR and files "size decrease" (Adobe magic stuff). By the way, I found out that the iPad iOs 4.2.1 could visualize properly PDF until version 1.4 (Adobe v.5). After that the images are not displayed, irrespective to wich program I using to visualize it (I tested: iBook, Safari integrated pdf engine, Goodreader, iAnnotate). After that process the file size is always different, but calibre does´n not refresh the metadata, so I try to cancel the format from the metadata (pointing to the actual file that is the new, small one) and to add it again. After that it results in a Zero bytes file! I don't know where is the problem. It happens exactly after clicking OK in the 'Edit Metadata Information' window. I also try with other format (djvu), but the result is the same. I guess that Calibre isn't happy to find a record in his db with the same name of an old, differing from the last saved file. NOTE: If the file reside somewhere else on my machine, it's fine. Calibre creates a copy of that file in the right folder and Amen. Last edited by kidpixo; 03-21-2011 at 08:08 AM. Reason: typos |
03-21-2011, 07:11 AM | #2 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
If you are trying to replace a PDF file that is already under Calibre control then you can do one of two things:
|
Advert | |
|
03-21-2011, 09:25 AM | #3 | ||
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
thanks for the answer! As you said, the method one or two are working fine, I feel just stupid
Quote:
Quote:
It should keep the old version (size X,let´s say) or the new one (X-1 size). I assume that calibre keeps the new file (wherever it is), then erases the old one and makes a copy of the new new one in the position once occupied by the old file. Add to this picture that I overwrite the new on the old file and you see the problem. That sounds like a program bug to me, even if my action was not standard: shouldn't be here a sort of idiot-protection? bye! |
||
03-21-2011, 10:00 AM | #4 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
whether it should be considered a bug or not is an interesting point as I suspect that the developers probably never though of that as something anyone would try and do. It is probably an enhancement request to add such a check - but it IS a good idea to have it as anything that can lead to data loss is highly undesireable.
|
03-23-2011, 04:12 AM | #5 | |
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Quote:
I'm wondering open a ticket about it for Calibre.. |
|
Advert | |
|
03-23-2011, 06:50 AM | #6 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
So you did a drag-n-drop from the calibre library folder to the available formats window in the edit metadata area. This is essentially a "move" and after a file is successfully copied/moved to the new location (same location in your example) the original would be deleted. This causes a 0.0 byte file.
You can't do this via two different file managers in Windows because it recognizes they are the same and throws up a error box and an annoying sound to let you know this isn't right. It seems calibre (python) isn't so forgiving. I tried this myself and did end up with a 0.0 byte file that was garbage. Read here to find out how to create a ticket. But like the old joke, Patient: Doctor, Doctor it hurts when I do this.... Doctor: Well don't do that. Congrats on being unique enough to find this "Opening of destruction". Last edited by DoctorOhh; 03-23-2011 at 04:09 PM. |
03-23-2011, 11:48 AM | #7 |
Well trained by Cats
Posts: 29,984
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
03-23-2011, 02:16 PM | #8 |
creator of calibre
Posts: 44,020
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Should be fixed in next release. calibre will now simply ignore attempts to overwrite a file with itself.
|
03-25-2011, 04:24 AM | #9 | |||||
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Quote:
Quote:
Quote:
Quote:
Quote:
Bye! -- "The Answer to the Great Question …" "Of Life, the Universe and Everything ..." said Deep Thought. "Is ... " said Deep Thought, and paused. "Forty-two," said Deep Thought, with infinite majesty and calm. |
|||||
03-25-2011, 05:40 AM | #10 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
That's what dwanthny was saying. It doesn't matter whether or not you delete the format from the Calibre database before. As soon as you start mucking about inside Calibre's library folder tree, Bad Things are going to happen to you sooner or later, as you have seen. It's best just to leave the library folder alone and use external folders as import sources.
|
03-25-2011, 08:27 AM | #11 | |
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Quote:
Calibre is just pointing to some file stored in some folder. If I add new thing there, it should not destabilize Calibre file management structure, because it is not scanning the folder tree to find new file (in this aspect is really close to iTunes). That's why I mentioned that I erased that specific file from inside Calibre: then it should be possible to add a new file without problem. Cheers. -- "The Answer to the Great Question …" "Of Life, the Universe and Everything ..." said Deep Thought. "Is ... " said Deep Thought, and paused. "Forty-two," said Deep Thought, with infinite majesty and calm. Last edited by kidpixo; 03-25-2011 at 08:28 AM. Reason: typos |
|
03-25-2011, 08:57 AM | #12 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
The last step, which was not needed and caused your problem, is what I described in post 6. You can always (even now) add in the manner you were using except in your third step you were adding from the calibre directory to the calibre directory. There was no need for this step, so no one else had ever stumbled across this error. After the fix feel free to do step three, it still won't be a needed step, but it won't hurt anything because it will essentially be ignored. |
|
03-25-2011, 09:39 AM | #13 | |
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Quote:
Note that in step 2 I meant "I moved the pdf file from /somewhere/ to the folder where Calibre stored the old file in the file system". I agree that there is a safer solution, but my problem was that I updated the pdf file and Calibre didn't recognize the change (namely, the file size was untouched). That's why I simply though to erase and re-add it to the library, assuming that the metadata are extracted once when the file were added to the database. I never suspected that add a file format would overwrite the old one: I'm maybe ultra-safe, but I'd create a secondary copy of it. That said, I get it, thanks! bye! -- "The Answer to the Great Question …" "Of Life, the Universe and Everything ..." said Deep Thought. "Is ... " said Deep Thought, and paused. "Forty-two," said Deep Thought, with infinite majesty and calm. |
|
03-25-2011, 10:01 AM | #14 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
03-25-2011, 10:32 AM | #15 | ||
Member
Posts: 19
Karma: 10
Join Date: Mar 2011
Location: Berlin , Deutschland
Device: iPad, Kobo Touch (dead)
|
Quote:
Quote:
You too! |
||
Tags |
calibre library |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF files under calibre | artimess | Calibre | 7 | 09-26-2010 10:41 AM |
PDF files in Calibre 0.7.13 | rxmom03 | Calibre | 3 | 08-10-2010 10:03 AM |
PDF files not loading on Calibre | Sarahp624 | General Discussions | 2 | 04-19-2010 04:55 AM |
Writing metadata to PDF files in Calibre | asts18 | Calibre | 3 | 03-23-2010 01:07 PM |
Converting PDF files in Calibre | BJWanlund | Calibre | 0 | 12-07-2008 10:28 PM |