
: Re: how to convert djvu files to some files? I want convert a djvu file to six pages, for example, how to convert a file with 504 pages to 84 files with 6 pages?
There is AFAIK not such a utility that does exactly what you want but you can explode the file by repeatedly using the djvused utility:
djvused file.djvu -e "select <nr>; save-page-with <filename>"
where <nr> is the pagenumber and <filename> the output filename. I have a python utility that does this automatically for all the pages while using incremental filename of the form page_<nr>.djvu.
After that you can combine multiple files with the djvm command:
djvm -c output.djvu page01.djvu page02.djvu ... page06.djvu
for each of the combinations of page. The images and associated data (like OCR-ed text) will get in the 84 files. That data is not unpacked and repacked, so the process doesn't lead to any loss of quality.
The following is a minimalistic version of my Python program that calls djvused to explode the file into individual pages:
#! /usr/bin/env python
import sys
from subprocess import check_output
page_base = 'page_{:03d}.djvu'
file_name = sys.argv[1]
djvused = 'djvused' # r'C:Program FilesDjVuLibredjvused.exe'
number_of_pages = int(check_output([djvused, file_name, '-e', 'n']))
for x in range(number_of_pages):
page_name = page_base.format(x)
check_output([djvused, file_name, '-e',
'select {}; save-page-with {}'.format(x+1, page_name)])
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Lorraine

: Bookeen is the manufacturer/distributor of the Cybook line of ebook reading devices based in France. Question marked for Bookeen, should either be generic for multiple Bookeen devices or pertain