Answers.Body: <p>There is AFAIK not such a utility that does exactly what you want but you can explode the file by repeatedly using the <code>djvused</code> utility:</p>
  
  <pre><code>djvused  file.djvu -e "select &lt;nr&gt;; save-page-with &lt;filename&gt;"
  </code></pre>
  
  <p>where <code>&lt;nr&gt;</code> is the pagenumber and <code>&lt;filename&gt;</code> the output filename. I have a python utility that does this automatically for all the pages while using incremental filename of the form <code>page_&lt;nr&gt;.djvu</code>.</p>
  
  <p>After that you can combine multiple files with the <code>djvm</code> command:</p>
  
  <pre><code>djvm -c output.djvu page01.djvu page02.djvu ... page06.djvu
  </code></pre>
  
  <p>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 <strong>not</strong> unpacked and repacked, so the process doesn't lead to any loss of quality.</p>
  
  <p>The following is a minimalistic version of my Python program that calls <code>djvused</code> to explode the file into individual pages: </p>
  
  <pre><code>#! /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 Files\DjVuLibre\djvused.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)])
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-01T02:58:37.780Z
Answers.Text: Which version of Python is it? Please add it to your answer. Do you have any project with this issue on GitHub where can I join? I am also interested in the issue Epub-DjVu-Python.
Answers.UserDisplayName: Stilgar Dragonclaw
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-01T05:42:24.033Z
Answers.Text: It should work with Python 2.6+ and Python 3.3+. I have all my (public) projects on  [bitbucket](https://bitbucket.org/ruamel/), and I would have to see if I can publish (more) djvu related code (currently I think only the DjVu code included in Calibre) was put in the public domain. Write me an email if you want to persue anything specific, chatting via comments  here is a bit limited.
Answers.UserDisplayName: Anthon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-01T11:38:10.507Z
Answers.Text: Ok, I'll look at it. Thx
Answers.UserDisplayName: Stilgar Dragonclaw
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-02-14T18:59:42.517Z
Answers.LastActivityDate: 2014-02-15T14:18:15.963Z
Answers.LastEditDate: 2014-02-15T14:18:15.963Z
Answers.UserDisplayName: Anthon
Answers.Body: <p>It looks like djvu files are essentially layered images, rather than anything textual. If this is in fact the case, getting text out of them will require optical character recognition (and subsequent proofreading) on the way to making an ebook. Those conversions can be problematic to do--there are frequently formatting issues.</p>
  
  <p>That being said, it looks like there's a push-button solution out there called <a href="https://cloudconvert.org/djvu-to-epub" rel="nofollow">CloudConvert</a>. Can't vouch for the quality of the file you get, but it might be a place to start.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-02-15T07:56:36.207Z
Answers.Text: scanned ebooks are often image based and non-textual, to get the pages out of them they do not need to be converted to text first, you just have to extract the relevant pages and their attached image(s), without conversion (which, you  correctly indicate, can involve formatting issues). Cloudconvert will not do that for you at all
Answers.UserDisplayName: Anthon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-02-14T18:43:19.157Z
Answers.LastActivityDate: 2014-02-14T18:43:19.157Z
Answers.UserDisplayName: Tom
Body: <p>I want convert a djvu file to six pages, for example,</p>
  
  <p>how to convert a file with 504 pages to 84 files with 6 pages?</p>
  
Tags: <conversion><djvu><windows>
Title: how to convert djvu files to some files?
UserDisplayName: niksirat
ThreadText: # how to convert djvu files to some files?
  
  (Asked by: username_0 on 2014-02-14)
  
  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?
  
  **Tags:** conversion, djvu, windows
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-02-14. Score: 3
  
  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 Files\DjVuLibre\djvused.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)])
  
  ```
  
  > **Comments:**
  > **username_2**: Which version of Python is it? Please add it to your answer. Do you have any project with this issue on GitHub where can I join? I am also interested in the issue Epub-DjVu-Python.  
  > **username_1**: It should work with Python 2.6+ and Python 3.3+. I have all my (public) projects on  [bitbucket](https://bitbucket.org/ruamel/), and I would have to see if I can publish (more) djvu related code (currently I think only the DjVu code included in Calibre) was put in the public domain. Write me an email if you want to persue anything specific, chatting via comments  here is a bit limited.  
  > **username_2**: Ok, I'll look at it. Thx  
  
  ---
  
  ### Answer by username_3 on 2014-02-14. Score: 0
  
  It looks like djvu files are essentially layered images, rather than anything textual. If this is in fact the case, getting text out of them will require optical character recognition (and subsequent proofreading) on the way to making an ebook. Those conversions can be problematic to do--there are frequently formatting issues.
  
  That being said, it looks like there's a push-button solution out there called [CloudConvert](https://cloudconvert.org/djvu-to-epub). Can't vouch for the quality of the file you get, but it might be a place to start.
  
  > **Comments:**
  > **username_1**: scanned ebooks are often image based and non-textual, to get the pages out of them they do not need to be converted to text first, you just have to extract the relevant pages and their attached image(s), without conversion (which, you  correctly indicate, can involve formatting issues). Cloudconvert will not do that for you at all  
  
  ---
  
  