MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Library Management (https://www.mobileread.com/forums/forumdisplay.php?f=236)
-   -   Adding PDF Scanned book (https://www.mobileread.com/forums/showthread.php?t=313790)

david55555 12-27-2018 03:52 PM

Adding PDF Scanned book
 
Hi everyone,

Recently, I photographed with my phone a whole book, which I wanted to keep - It belongs to a library.
After I took all the shots, I put them all into a PDF file. Now, I want to add that PDF to my Library on Calibre.
First, whenever I was Browsing my computer with Calibre the book wouldn't show up. I got to work around this by having Calibre Showing all files. Now, when I try to add the book, I get the following error:

calibre, version 3.21.0
WARNING: Errors while adding: There were problems adding some files, click "Show details" for more information


Code:

----------------------------------------------------------------------
Failed to add the file /home/me/Documentos/Biblioteca/The book to the book: The Book
With error:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/add.py", line 430, in add_formats
    if self.db.add_format(book_id, fmt, path, run_hooks=False, replace=replace):
  File "/usr/lib/calibre/calibre/db/cache.py", line 1411, in add_format
    size, fname = self._do_add_format(book_id, fmt, stream, name)
  File "/usr/lib/calibre/calibre/db/cache.py", line 1378, in _do_add_format
    size, fname = self.backend.add_format(book_id, fmt, stream, title, author, path, name, mtime=mtime)
  File "/usr/lib/calibre/calibre/db/backend.py", line 1495, in add_format
    fname = self.construct_file_name(book_id, title, author, len(fmt))
  File "/usr/lib/calibre/calibre/db/backend.py", line 1199, in construct_file_name
    raise ValueError('Extension length too long: %d' % extlen)
ValueError: Extension length too long: 106


What can I do to fix this?

TL;DR: I have a PDF with a bunch of photos from a book but I can't add it to Calibre. How to fix this?

PeterT 12-27-2018 04:04 PM

I think it's related to the name of the file.

david55555 12-27-2018 04:25 PM

Quote:

Originally Posted by PeterT (Post 3791737)
I think it's related to the name of the file.

Any ideia? Could it be too long? Or the fact that it has some special caracters? like ã

Adoby 12-27-2018 04:28 PM

Try calling it "a.pdf" and see if that helps.

BetterRed 12-27-2018 04:33 PM

@david55555 : if it is a PDF then the file name should end with .pdf. The tool you used to create the pdf from the images should have done that for you.

FX: author name - book title.pdf

BR

david55555 12-27-2018 04:33 PM

Quote:

Originally Posted by PeterT (Post 3791737)
I think it's related to the name of the file.

actually, changing the file name and folder name didn't do it, but I get a Different error now:

calibre, version 3.21.0
AVISO: Erro ao adicionar: Houve problemas na adição de alguns ficheiros, carregue em 'Mostrar detalhes' para mais informações


Code:

----------------------------------------------------------------------
Falha ao adicionar o ficheiro /home/david/Documentos/Biblioteca/1/1 ao livro 1
Com o erro:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/add.py", line 430, in add_formats
    if self.db.add_format(book_id, fmt, path, run_hooks=False, replace=replace):
  File "/usr/lib/calibre/calibre/db/cache.py", line 1411, in add_format
    size, fname = self._do_add_format(book_id, fmt, stream, name)
  File "/usr/lib/calibre/calibre/db/cache.py", line 1378, in _do_add_format
    size, fname = self.backend.add_format(book_id, fmt, stream, title, author, path, name, mtime=mtime)
  File "/usr/lib/calibre/calibre/db/backend.py", line 1519, in add_format
    with lopen(dest, 'wb') as f:
  File "/usr/lib/calibre/calibre/startup.py", line 139, in local_open
    ans = open(name, mode, bufsize)
IOError: [Errno 2] Ficheiro ou directoria inexistente: u'/home/david/Biblioteca do Calibre/Desconhecido/1 (11)/1 - Desconhecido./home/david/documentos/biblioteca/1/1'

Last line says FIle or directory doesn't exist.

I don't have this problem with any other books

BetterRed 12-27-2018 04:35 PM

Just drag the file into the book list and drop it.

david55555 12-27-2018 04:35 PM

I wish I could quote all, but I can't so nevermind. It was really as easy as add a .pdf in the end. Thanks guys, worked perfectly.

DNSB 12-27-2018 05:54 PM

1 Attachment(s)
I would question why any help was offered to someone who to by all appearances is committing piracy and/or copyright violation.

Hmmm... borrowed a library book, took pictures with a phone of all pages and created a pdf of the image files and now want to add it to calibre.

My apologies to any moderators whose toes I've stomped on.

PeterT 12-27-2018 07:37 PM

Quote:

Originally Posted by DNSB (Post 3791789)
I would question why any help was offered to someone who to by all appearances is committing piracy and/or copyright violation.

Hmmm... borrowed a library book, took pictures with a phone of all pages and created a pdf of the image files and now want to add it to calibre.

My apologies to any moderators whose toes I've stomped on.

Oops I overlooked that!

Sent from my Nexus 7 using Tapatalk

BetterRed 12-27-2018 11:28 PM

Quote:

Originally Posted by PeterT (Post 3791818)
Oops I overlooked that!

same here - my eyes went straight to the error text.

BR


All times are GMT -4. The time now is 05:37 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.