ps/pdf to djvu optimal conversion [solution found]
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ps/pdf to djvu optimal conversion [solution found]
I was going to ask what is the best way to convert pdf to djvu, because while I tried converting it different ways many produced rather crappy results. In the end, after much trial and error, I found the best way to do it that produces optimal results, so I'm going to post it in case someone else wants to know.
The reason I needed this conversion was because I had a large pdf that loaded EXTREMELY slowly even after optimizing it. Now that I converted it to djvu it's much faster.
Note that this method is both faster and better than any2djvu (the public server that converts things to djvu)
This conversion also helps in cases where pdf images are printed as black squares ... a waste of ink.
Last edited by H_TeXMeX_H; 01-18-2009 at 03:47 AM.
Reason: added extra links and info
I have a musical score in PDF, and I can't get either xpdf nor acroread to keep up with the music. Refreshing takes too much time ... on my quad ... they must be singlethreaded then so (I imagine). At the outset I didn't think a conversion would help ... but let's see.
I also see it's a hand compilation of various packages ... oops, will take time ... oh well, could be worth it. Will be doing it on my ubuntu though ... more or less have my slack abandoned these days ... no doubt to my detriment.
<later ...>
OK, gsdjvu is in .. but djvudigital (oddish name) wasn;t around, nto in ubuntu any way. Prob the usual devels left out. Hmmm, no, not really.
OK .. hand compile djvulibre. Will have multiple djvu's now. Ooops.
<later ...>
Ok, after this djvudigital came up. Right.But now there's a path problem. It can't find the ghostscript driver in gsdjvu. Eeek. I'm going through quite alot of start-stops now.
<still later ...>
Yep, unless you put the gsdjvu and gs executables into directories already in your $PATH, you have to extend your search $PATH. Really it's just those two.
results: my score no longer has any refresh problem, though the filesize is considerably bigger (400k to 2.5M).
Es war ein schwere Geburt, as the Germans might say, ... but I got there.
Good call.
Last edited by stabu; 01-17-2009 at 08:19 PM.
Reason: after some investig
Ok, I added more links to make it easier to download and install it. Also know that there is a '--dpi=' option to set the DPI, which will affect output file size.
it fails, and then I begin fiddling, by leaving the cseparg option out, and I get a DJVU file of 1.8MB. Twice the size it should be. Sure, you can reduce it by using the dpi=100 option, to as low as 600kB, but the quality suffers, and the idea was that you whould get 900kB without compromising quality.
So, the problem (if you're still interested) is the --cspearg option. If you look up "man cseparg", well, the p option doesn't exist. aand you would need to have an equals sign after the p if you want to follow its conventions. But of course we are calling csepargs _from_djvudigital ...
so it's all a quandary, with no joy at the end.
Have you seen that? If you're interested and have a spare moment, chekc out the operation and say here if you've managed to get anything out of it.
If not, don't worry! I actually posted a query on their site ... but nobody is too interested in it. which is bizarre. I mean, it could be not true ... a propaganda exercise for DJVU, possibly.
Thanks!
Last edited by stabu; 01-20-2009 at 04:15 PM.
Reason: afterthought
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.