Search code examples
linuxpage-numberingdjvu

how to reassign page number in DJVU file?


Is there a simple way to renumber pages in a DJVU file?

Example: I've got a book, and page 1 is actually the cover, and so on, such that the actual page 1 of the book is at, say, 10 in the document; what I'd like to do is call them something like C,i,ii,..., and then 1,2,...

I know it can be done, since I've got other books in this format with this numbering, and I'd like to do it on Linux, better if via terminal.

Thanks, N


Solution

  • to renumber

    for (( i=11; i<=823; i++ ))
    do
     djvused new.djvu -e "select $i; set-page-title $((i-10)); save"
    done
    

    to rename

    djvused new.djvu -e 'select 2; set-page-title ii; save'