简体   繁体   English

如何在DJVU文件中重新分配页码?

[英]how to reassign page number in DJVU file?

Is there a simple way to renumber pages in a DJVU file? 有没有一种简单的方法可以对DJVU文件中的页面重新编号?

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; 例子:我有一本书,而第1页实际上是封面,依此类推,因此该书的实际第1页位于文档中的第10页; what I'd like to do is call them something like C,i,ii,..., and then 1,2,... 我想做的就是称它们为C,i,ii,...,然后为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. 我知道这是可以做到的,因为我还有其他带有这种编号的格式的书,我想在Linux上做,最好是通过终端。

Thanks, N 谢谢,N

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'

It's slightly offtopic. 这有点题外话。 Just in case someone needs to do the same thing on Windows using PowerShell: 以防万一有人需要使用PowerShell在Windows上执行相同的操作:

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
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM