View Single Post
Old 04-26-2007, 06:22 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,585
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm problems
The following cmdline cause an exception
Code:
python pdfread.py -p prs500 -o /home/kovid/temp/test.lrf -t 'Guide to NumPy' -a 'Travis Oliphant' -f lrf -i pdf -m potrait  /home/kovid/documents/text/notes/NumPy/numpybook.pdf --last-page=2

Creating BBeB file ... Traceback (most recent call last):
  File "/home/kovid/build/pdfread-1.6/pdfread.py", line 204, in <module>
    main()
  File "/home/kovid/build/pdfread-1.6/pdfread.py", line 90, in main
    delete = output.generate(input.toc)
  File "/home/kovid/build/pdfread-1.6/output.py", line 211, in generate
    imagenum = toc_map[int(page_)]
KeyError: 12
Probably because the TOC refers to pages not included.

Also, this is my first time rasterizing a PDF (I usually have access to the LaTeX sources). Is the font rasterization always so bad? I've attached samples to show you what I mean.
Attached Files
File Type: lrf test.lrf (31.1 KB, 1619 views)
File Type: pdf numpy_tutorial [miex.org].pdf (25.6 KB, 2989 views)
kovidgoyal is offline   Reply With Quote