-
-
Save jdrew1303/37f50af64c5a4bf1b16478500cd66cfe to your computer and use it in GitHub Desktop.
Converting from DJVU to PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Here is the software that is needed for the conversion to take place: | |
# 1. DjVuLibre . | |
# 2. LibTiff . | |
# | |
# NOTE: The ddjvu utility has an option to convert specific layers. One common mistake is to convert only the mask layer | |
# or the foreground layer . Technically speaking, the mask layer is the one that should have the actual text but in | |
# practice I have seen that the the DjVu encoder occasionally puts portions of the text in the background layer. Thus, | |
# if you only take the foreground or mask layers, you will lose those bits in the background. If your specific files | |
# don't have that issue, that you should use the layer switch since it reduces file size and increases readibility. | |
# | |
djvu -verbose -format=tif %1 temp.tif | |
tiff2pdf temp.tif -o %2 | |
rm temp.tif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment