From: deb <ot...@hu...> - 2013-01-23 19:45:02
|
I see this is very low freq list (1 mail in last 7 years?), but hopefully this message will not be in vain, as DjVu driver gives so good results. I also have impression that very few people know about it. "gsdjvu-1.5.tar.gz" can't be compiled with suggested GhostScript version on MinGW, but with latest version it can (at time of writing 9.06). This way GS interpreter still won't accept PDF input and pipes won't work. For fixing pipes this patch is needed: http://ghostscript.com/pipermail/gs-devel/2013-January/009382.html Here is explicitly: ================================================================================ diff --git a/gs/psi/gs.c b/gs/psi/gs.c index 530303b..3484654 100644 --- a/gs/psi/gs.c +++ b/gs/psi/gs.c @@ -62,6 +62,9 @@ commit_stack_pages( void ) } #endif +#include <stdio.h> +#include <fcntl.h> + int main(int argc, char *argv[]) { @@ -73,6 +76,9 @@ main(int argc, char *argv[]) commit_stack_pages(); #endif exit_status = 0; +setmode(STDIN_FILENO, O_BINARY); +setmode(STDOUT_FILENO, O_BINARY); +setmode(STDERR_FILENO, O_BINARY); /* * Call setlocale(LC_CTYPE), so that we can convert PDF passwords ================================================================================ Afterwhich "Makefile.in" from GS base folder needs to be copied in parent, or if user is in GS source top folder, this command will do it: cp base/Makefile.in . That's all! As mentioned PDF is not accepted as input for some reason but we can always pipe PS from another GS instance. Here is minimal example batch file (for more proper usage there is readme file in gsdjvu archive and djvudigital bash script): ================================================================================ gswin32c -sstdout=nul -dQUIET -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile=- input.pdf ^ | gsdjvu -sstdout=nul -dQUIET -dNOPAUSE -dBATCH -sDEVICE=djvusep -sOutputFile=- - ^ | csepdjvu -v - output.djvu ================================================================================ |