Tag Info

Hot answers tagged

7

Yes, there is. Though its name is djvutxt, not djvu2text. It is part of: the djvu package on Gentoo. the djvulibre-bin package on Debian/Ubuntu.


3

I tried printing the djvu file to PDF (using Evince, so it's probably a mix of djvulibre, gtk+ and cairo), but I got a way smaller result by converting the djvu pages to pdf using ImageMagick's convert. For this, you need to extract each page as a separate djvu document (I'm not sure if convert is able to deal multipage djvu and multipage pdf that ...


3

This is caused by limitations in the version of libpoppler that pdf2djvu is using, triggered by specific fonts, and because of the way pdf2djvu handles them. Opening such a file in evince (from an X based terminal) will show you the same error messages with FoFiType1 under Ubuntu 12.04. Since evince ignores the errors it can display the file. What you can ...


2

Quoting http://djvu.sourceforge.net/doc/man/djvused.html Strings denote an arbitrary sequence of bytes, usually interpreted as a sequence of UTF-8 encoded characters. Strings in djvused files are similar to strings in the C language. They are surrounded by double quote characters. Certain sequences of characters starting with a backslash ("\") have a ...


2

Here's an awk script that attempts to produce decent indentation. It assumes the input is well-formed (e.g. the line before 3.2.2 must be 3.1 or 3.1.something, not 3). #! /usr/bin/awk -f BEGIN { printf "(bookmarks"; depth = 1; } { level = split($1, s, "."); while (level < depth) {--depth; printf ")";} print ""; depth = level + 1; ...


2

I didn't see any way to explicitly save a range of pages, so I opted to delete the rest. # Extract and save each page in its own file pages=$(djvused -e 'n' "$if") for ((i=1; i<=$pages; i++)) ;do of="${if%.*}.$(printf "%03d" $i).djvu" djvused -e "select $i; save-page-with \"$of\"" "$if" done # Remove one page from an existing djvu file djvm ...


2

The 'simple' way would be to convert the .djvu file back to multiple .tiff files (not to a multipage TIFF) and then recombine them with djvubind. That however will decrease the image quality of the .djvu files somewhat as this is a lossy conversion (almost certainly when you use. So you better insert the OCR-ed text in the original .djvu and this is what ...


2

djvused -e n file.djvu (from http://djvu.sourceforge.net/, djvulibre-bin package on Debian and derivatives).


2

The following is untested, but in principle it should work (I will test it if I have more time). You could convert the djvu file for example to jpg's like this: #!/bin/sh # djvu -> jpgs converter i=1 # number of pages (392) while [ $i -ne 392 ] do ddjvu -page=$i -format=pnm 1.djvu $i.pnm pnmtojpeg $i.pnm > $i.jpg rm -f $i.pnm echo "page $i done" ...


1

I would just use: DjVuLibre DjView 4.5 Viewer for DjVu documents. Its GUI has a Save as function under File menu and there one can save a given range of pages into djvu file.


1

I recommend PDF-Xchange Editor (installable in Linux through Wine). It functions both as a good viewer, allowing you to open multiple files in tabs. The UI is fantastic. And best of all, it stores annotations/comments within the file, unlike Okular. How to install? In Ubuntu follow the instructions in: ...


1

Sorry I can't comment yet, but check out zathura http://pwmt.org/projects/zathura/


1

From this U&L question and by extension the Okular documentation, you should be able to do this using File -> Save As to save a copy of the annotated document as a PDF. I quote the relevant part of the documentation: Since Okular 0.15 you can also save annotations directly into PDF files. This feature is only available if Okular has been built with ...


1

Taking bot2417's script as base, here my own #!/bin/bash echo "################################################" echo Usage: djvusplit2 LASTPAGE FILE.DJVU echo "################################################" if [ ! -f $2 ]; then echo "file $2 not exists!\n" exit fi start=1 mkdir ./tmp for i in $(seq $start +1 $1) do j=$(($i*2-1)) ...


1

Here is my complete working script. It needs djvulibre-bin library for ddjvu (decode to tiff format), cjb2 (because i don't know how to directly convert tiff to djvu), djvm (for insertions/deletions of pages in djvu file) tools and imagemagick library for convert (for splitting page and converting to mystical pbm file format) tool. All libraries available ...


1

There aren't so many tools that can operate directly on DjVu files, compared with other more common formats such as PDF or JPEG. With image manipulation programs, there's the added hurdle that most of these operate on a single image at a time, but the DjVu file contains multiple pages. One possibility is to go via pdf. With ddjvu from DjVuLibre, a PDF un2up ...


1

Similar to the .pdf example, the following script will print the first line of text found on a given page (via head -n 1). You can see the available commands by typing djvused --help in the terminal. djvused is in the package djvulibre-bin if="$HOME/Downloads/The Geometry of Exponential Families.djvu" pages=$(djvused -e 'n' "$if") for ((i=1; ...


1

Any programming language will be able to parse your input example correctly. Choose a programming language and then parse the input deliminating the input first by "." and " " at first and " " second. I would use Perl, but whatever language the developer is most familiar with would work fine. Keep in mind that automatic solutions will only work if the ...



Only top voted, non community-wiki answers of a minimum length are eligible