Question

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

Was it helpful?

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'

OTHER TIPS

It's slightly offtopic. Just in case someone needs to do the same thing on Windows using PowerShell:

for($i=11; $i -le 823; $i++){
  $j=($i-10)
  $args = "new.djvu -e ""select $i; set-page-title $j; save""" 
  write-host "djvused $args"
  start-process djvused $args -NoNewWindow -wait
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top