PDA

View Full Version : [ubuntu] How to convert djvu to pdf



Tapas Bose, India
August 5th, 2009, 12:15 PM
Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)


Step - 2 : Install


djvulibre-bin
libdjvulibre21
okular-extra-backends
evince
libevdocument1
libevview1



Step - 3 : Goto terminal and write


sudo apt-get install libtiff-tools


Step - 4 : Goto the directory where the djvu file is present. Click the right mouse button. Goto “Open In Terminal” option. Click on it. A terminal will open.


Step - 5 : In that terminal write


ddjvu -format=tiff file_name.djvu file_name.tiff


tiff2pdf -j -o file_name.pdf file_name.tiff





The djvu to pdf conversion is done. :) :)



N.B. file_name means name of your djvu file.

Tapas Bose, India
August 5th, 2009, 12:40 PM
Correction :

djvu2pdf???? see how to convert djvu to pdf

Sef
August 5th, 2009, 02:56 PM
merged threads.

Geraba
February 23rd, 2010, 06:45 PM
I tried this, and I got the message:


Aborted (core dumped)

Using verbose mode, it seems it gives this error in the middle of the document... So the .tif file is incomplete.

redbook4574
February 23rd, 2010, 07:51 PM
I tried this, and I got the message:


Aborted (core dumped)

Using verbose mode, it seems it gives this error in the middle of the document... So the .tif file is incomplete.


Admittedly I have never used Djvu but would it not be possible to simply open the djvu file with djvu viewer and then print to a pdf printer (ie cups-pdf).

Geraba
February 23rd, 2010, 09:45 PM
It seems it worked... Thanks!

But is there a way to convert using the command line only?

ubunterooster
February 23rd, 2010, 10:20 PM
why can't you just cntrl+p, print to file, and have that file be pdf?

Genitruc
March 12th, 2010, 08:44 PM
Here how I did.
1) open file.djvu with evince
2) use ctrl+p to go in the print option and choose "print to file". This convert your file in .ps
3) open okular and use "import to pdf" in the file menu to import your .ps file.
4) use "save as" to save your document in pdf

Genitruc

cor3huis
April 27th, 2010, 01:30 PM
What about simply using DJView and export as PDF?

Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
Step - 2 : Install DJview4
Step - 3 : Run DJview (Applications - Graphics - DJView4)
Step - 4 : Open your .djvu document
Step - 5 : Menu - Export As: PDF

Done! A simpler method I cannot think of :-) Good luck!

gazazello
August 14th, 2010, 06:41 PM
What about simply using DJView and export as PDF?

Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
Step - 2 : Install DJview4
Step - 3 : Run DJview (Applications - Graphics - DJView4)
Step - 4 : Open your .djvu document
Step - 5 : Menu - Export As: PDF

Done! A simpler method I cannot think of :-) Good luck!

Nice! It worked swiftly and smoothly! Thank you!

ivan.p
August 18th, 2010, 11:31 PM
Using Djview4 worked for me too. Thank you.

ivan.p
August 18th, 2010, 11:58 PM
why can't you just cntrl+p, print to file, and have that file be pdf?


Admittedly I have never used Djvu but would it not be possible to simply open the djvu file with djvu viewer and then print to a pdf printer (ie cups-pdf).

I suspected Djview4 would keep text as text when generating a PDF file. This would have been a strong argument in favour of Djview4 vs cups-pdf. Apparently, Djview4 exports everything as images, which means that it generates huge PDF files, even when the original Djvu files are small.

However, evince does not render some Djvu files properly. To use your method (printing the file as PDF), you may need to use a Djvu viewer other than evince. But yes, in principle, your method would work just fine, and it has the advantage of not requiring the installation of new software.

It remains to be seen if there's an alternative solution in which the text in a Djvu file is exported as text in a PDF file.

naught101
September 9th, 2010, 11:47 PM
None of the methods here keep the underlying text in an OCR'd djvu when converting to a pdf. Anyone know how to do that?

cmcanulty
September 24th, 2010, 01:28 PM
I agree a simple utility hopefully with a GUI is really needed for this conversion

mahy
September 30th, 2010, 10:07 AM
Here how I did.
1) open file.djvu with evince
2) use ctrl+p to go in the print option and choose "print to file". This convert your file in .ps
3) open okular and use "import to pdf" in the file menu to import your .ps file.
4) use "save as" to save your document in pdf

Genitruc

Works in most cases, but I had a djvu document with some portrait and some landscape pages. This method resulted either in all pages portrait or all pages landscape...

mahy
September 30th, 2010, 10:10 AM
ddjvu -format=tiff file_name.djvu file_name.tiff


tiff2pdf -j -o file_name.pdf file_name.tiff



I succeeded in creating the TIFF file, but then the subsequent PDF file was okay viewed in Evince, but Adobe Reader and Foxit Reader displayed it all RED! ](*,)

The only option was to leave out the "-j" JPEG encryption. However, the resulting PDF was more than 10 times as big... :)

rndmusr
October 17th, 2010, 07:39 PM
http://0x2a.at/s/projects/djvu2pdf

command line tool for djvu to pdf conversion

bariskeskin
December 11th, 2010, 10:21 PM
What about simply using DJView and export as PDF?

Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
Step - 2 : Install DJview4
Step - 3 : Run DJview (Applications - Graphics - DJView4)
Step - 4 : Open your .djvu document
Step - 5 : Menu - Export As: PDF

Done! A simpler method I cannot think of :-) Good luck!


I tried the other solutions but only this one worked for me thank you very much :)

cmcanulty
December 11th, 2010, 11:36 PM
That works great does anyone know of a similar tool to convert chm files to pdf hopefully a graphical tool.

Hrexen
January 20th, 2011, 06:58 AM
I did it in other way.
I just printed it to file twice by default Document Viewer.
For first time to .ps and after to .pdf.

P.S. .ps to .pdf conversion takes a lot of time. :)

luisjaime
February 25th, 2011, 05:18 PM
Thanks, the last sugestion is very efficient and practical.
:D

luisjaime
February 25th, 2011, 05:23 PM
Thanks, the last post gave me the solution, it's very efficiently and practical

airtonix
March 1st, 2011, 02:17 PM
hilarious, turned an 8mb djvu file into a 300mb pdf.

Rushyang
March 10th, 2011, 06:16 PM
hilarious, turned an 8mb djvu file into a 300mb pdf.

Same case here.. My 5MB djvu file turned out as 614MB pdf..:shock: I deleted it after conversion.. 8-[

haydoni
May 31st, 2011, 10:55 PM
None of the methods here keep the underlying text in an OCR'd djvu when converting to a pdf. Anyone know how to do that?
I'd also like to know this! :confused:

Varad Vyapari
June 5th, 2011, 04:33 PM
What about simply using DJView and export as PDF?

Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
Step - 2 : Install DJview4
Step - 3 : Run DJview (Applications - Graphics - DJView4)
Step - 4 : Open your .djvu document
Step - 5 : Menu - Export As: PDF

Done! A simpler method I cannot think of :-) Good luck!
thanks bro, it really is too simple..will u assist me as to how to post queries on ubuntu forums? i m a school-going boy and am not adept to ubuntu forums.
thanks a lott

honeybear
September 6th, 2011, 06:49 PM
Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)


Step - 2 : Install


djvulibre-bin
libdjvulibre21
okular-extra-backends
evince
libevdocument1
libevview1



Step - 3 : Goto terminal and write


sudo apt-get install libtiff-tools


Step - 4 : Goto the directory where the djvu file is present. Click the right mouse button. Goto “Open In Terminal” option. Click on it. A terminal will open.


Step - 5 : In that terminal write


ddjvu -format=tiff file_name.djvu file_name.tiff


tiff2pdf -j -o file_name.pdf file_name.tiff





The djvu to pdf conversion is done. :) :)



N.B. file_name means name of your djvu file.

djview4 has amazing export options. it is x11 and gtk. great

http://djvu.sourceforge.net/djview4.html

b77665
December 20th, 2011, 06:35 PM
There is no need for the djvu2pdf script. You can also convert a djvu file to pdf with the following terminal command:

ddjvu -format=pdf input.djvu output.pdf

Nevertheless the filesize is bloated as mentioned. Maybe this is caused by a missing compression of internally used imagefiles.

Varad Vyapari
May 16th, 2012, 10:03 PM
install DjView4, open the djvu document then click on file-export as and proceed..it is indeed simple and efficient though it can blow up the file size considerably

selinger
November 28th, 2012, 05:44 AM
The "export to PDF" option in djview worked fine, except that it lost the searchable text. The djvu file I am looking at consists of some scanned pages of text, with the "encoded" text behind it so that it is searchable. In the PDF, there are just the scanned image, all the character info is lost.

Does anyone know how to convert it to PDF and preserve the searchability?

VirtualPirate
February 19th, 2013, 03:17 PM
Quote:
Originally Posted by cor3huis
What about simply using DJView and export as PDF?

Step - 1 : Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
Step - 2 : Install DJview4
Step - 3 : Run DJview (Applications - Graphics - DJView4)
Step - 4 : Open your .djvu document
Step - 5 : Menu - Export As: PDF

Done! A simpler method I cannot think of Good luck!


This worked great thanks.):P

oldos2er
February 19th, 2013, 06:34 PM
Old thread closed.