Move a page to another place in a djvu file

1

I was wondering how to move a page to another place in a djvu file?

For example, I wish page 7 can be moved to be between page 10 and 11, where all the page numbers are specified relative to the original djvu file. In other words, page 8~10, 7 in the original djvu file becomes page 7~9, 10 in the new djvu file.

I have heard of djvused, but am not sure if it can be of help.

My OS is Ubuntu 10.10.

Thanks and regards!

Tim

Posted 2011-06-07T01:15:52.197

Reputation: 12 647

Answers

1

Solution 1 - simple

Download the English version of DJVU TOY. This allows you to split and merge documents as you see fit. It is very straight forward. Here are the man pages. You will need Google translate to translate the pages into English. I use Chrome so it was not a problem.

Simply split your entire document. Change the page ordering/numbering in the folder and then merge.

Solution 2 - more difficult, djvuextract is poorly documented.

You can use DJVUEXTRACT to extract pages from a DJVU file and DJVUMAKE to reassemble the file.

All are part of the DJVULibre project. It is a pretty cool library and will do most things you need. It runs on Ubuntu too of course.

slotishtype

Posted 2011-06-07T01:15:52.197

Reputation: 2 875

Thanks! I am not sure about the manpages for the two commands. Suppose the djvu file's name is myfile.djvu, how shall I generate another new file new.djvu, with page 8~10, 7 in the original djvu file being page 7~9, 10 in the new djvu file? – Tim – 2011-06-07T13:25:04.280

@Tim Did you get sorted? If not, I will look at this tomorrow. Could you explain what you need, I am still a little confused... – slotishtype – 2011-06-08T21:06:00.717

Thanks! My intention was to move page 7 to page 10. I still don't quite understand how that can be achieved by DJVUEXTRACT and DJVUMAKE? – Tim – 2011-06-08T22:12:11.170

So, page 10 becomes page 7, and page 10 becomes page 11, i that correct? So the order in the new file is 1, 2, 3, 4, 5, 6, [*7 removed], 8, 9, [*7 inserted], 10, 11, 12 ... – slotishtype – 2011-06-08T22:25:25.840

Almost, page 7 in the old file becomes page 10 in the new file, i.e., 1, 2, 3, 4, 5, 6, [*7 removed], 8, 9, 10, [*7 inserted], 11, 12 ... – Tim – 2011-06-09T00:27:15.840

Cool. Will add answer later. – slotishtype – 2011-06-09T07:13:30.850

@Tim Check out the new answer. Works great. – slotishtype – 2011-06-09T13:12:06.847

Thanks! It seems to be nice under Windows. I tried it with Wine under Ubuntu, and it works although it also increases the size of the files more than 10 times during splitting and merging. – Tim – 2011-06-09T15:01:44.403