Difference between revisions of "Asagoth"
From Retro CDN
m |
|||
Line 10: | Line 10: | ||
:::::::: I've done as you said... which tool have you used ?...--[[User:Asagoth|Asagoth]] ([[User talk:Asagoth|talk]]) 12:31, 7 May 2020 (EDT) | :::::::: I've done as you said... which tool have you used ?...--[[User:Asagoth|Asagoth]] ([[User talk:Asagoth|talk]]) 12:31, 7 May 2020 (EDT) | ||
::::::::: Edit: issue #25 outputs pages with a low resolution of 419x594 ...--[[User:Asagoth|Asagoth]] ([[User talk:Asagoth|talk]]) 12:43, 7 May 2020 (EDT) | ::::::::: Edit: issue #25 outputs pages with a low resolution of 419x594 ...--[[User:Asagoth|Asagoth]] ([[User talk:Asagoth|talk]]) 12:43, 7 May 2020 (EDT) | ||
+ | |||
+ | "it's a big faff" | ||
+ | |||
+ | I got some results: | ||
+ | |||
+ | #Avoid the online converters - they're not fit for purpose. | ||
+ | #Hunt down the DjVuLibre library | ||
+ | #Use the ddjvu command line tool to output each page as a TIFF file (http://djvu.sourceforge.net/doc/man/ddjvu.html) (the PDF conversion leads to stupid file sizes - ignore that) | ||
+ | #Convert pages to JPEG | ||
+ | #[[File:JPEGtoPDF.7z]] | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | rem Look at me I'm a batch script. | ||
+ | |||
+ | @echo off | ||
+ | rem del *.jpg /Q | ||
+ | |||
+ | rem Extract each page as TIFF files | ||
+ | for /L %%A in (1,1,36) do ( | ||
+ | ddjvu -format=tiff -page=%%A test.djvu test%%A.tif | ||
+ | ) | ||
+ | |||
+ | rem Get Imagemagick to convert from TIFF to JPEG. | ||
+ | magick mogrify -format jpg -quality 75 *.tif | ||
+ | |||
+ | rem Delete all the remaining TIFF files | ||
+ | del *.tif /Q | ||
+ | </pre> | ||
+ | |||
+ | e.g. | ||
+ | [[:File:GryKomputerowe PL 06.pdf]] | ||
+ | |||
+ | I'm sure it can be made more intelligent. -[[User:Black Squirrel|Black Squirrel]] ([[User talk:Black Squirrel|talk]]) 13:02, 7 May 2020 (EDT) |
Revision as of 12:02, 7 May 2020
Djvu to PDF
How do you change Djvu files to PDF? I watched files you put in and some are good but some are illegible so I wanted to ask.--Lukdriver14 (talk) 10:12, 7 May 2020 (EDT)
- www.onlineconverter.com--Asagoth (talk) 10:16, 7 May 2020 (EDT)
- I broke djvu to jpg and then combined into pdf. The quality was better than the online converter but the files were larger and the process was quite long.--Lukdriver14 (talk) 10:53, 7 May 2020 (EDT)
- So... do you want to do it instead? --Asagoth (talk) 11:01, 7 May 2020 (EDT)
- I just wanted to say that if the file is very unreadable then you can always use this method.--Lukdriver14 (talk) 11:06, 7 May 2020 (EDT)
- I see... I'll give it a try then...--Asagoth (talk) 11:11, 7 May 2020 (EDT)
- So what about now?... Does it look good to you?...--Asagoth (talk) 11:28, 7 May 2020 (EDT)
- This one looks good and this one does not--Lukdriver14 (talk) 12:20, 7 May 2020 (EDT)
- So what about now?... Does it look good to you?...--Asagoth (talk) 11:28, 7 May 2020 (EDT)
- I see... I'll give it a try then...--Asagoth (talk) 11:11, 7 May 2020 (EDT)
- I just wanted to say that if the file is very unreadable then you can always use this method.--Lukdriver14 (talk) 11:06, 7 May 2020 (EDT)
- So... do you want to do it instead? --Asagoth (talk) 11:01, 7 May 2020 (EDT)
- I broke djvu to jpg and then combined into pdf. The quality was better than the online converter but the files were larger and the process was quite long.--Lukdriver14 (talk) 10:53, 7 May 2020 (EDT)
"it's a big faff"
I got some results:
- Avoid the online converters - they're not fit for purpose.
- Hunt down the DjVuLibre library
- Use the ddjvu command line tool to output each page as a TIFF file (http://djvu.sourceforge.net/doc/man/ddjvu.html) (the PDF conversion leads to stupid file sizes - ignore that)
- Convert pages to JPEG
- File:JPEGtoPDF.7z
rem Look at me I'm a batch script. @echo off rem del *.jpg /Q rem Extract each page as TIFF files for /L %%A in (1,1,36) do ( ddjvu -format=tiff -page=%%A test.djvu test%%A.tif ) rem Get Imagemagick to convert from TIFF to JPEG. magick mogrify -format jpg -quality 75 *.tif rem Delete all the remaining TIFF files del *.tif /Q
e.g. File:GryKomputerowe PL 06.pdf
I'm sure it can be made more intelligent. -Black Squirrel (talk) 13:02, 7 May 2020 (EDT)