Adam R. Maxwell wrote:
On Feb 13, 2010, at 11:08 AM, thecolourblue wrote:

hi,

Adam R. Maxwell wrote:
On Feb 13, 2010, at 8:02 AM, thecolourblue wrote:
This is nothing like asking Skim to support lots of different file types like 
office .docx documents or photoshop .psd's- but more like its existing support 
for dvi files (which it simply converts to pdf).

Which arguably shouldn't have been added in the first place, especially since 
it depends on non-system utilities :).  If this is what you want, can you 
convert these djvu files to PDF?


sure- in fact I may take this approach after this discussion. The reason I am 
looking for Skim to display djvu in addition to pdf is that my djvu documents 
converted to pdf would take up several times more space (between 7 and 10 times in 
the tests I have done), and I have a lot of them. This is a one-off cost and 
perfectly do-able, but the resulting pdf's are very slow and inefficient to load 
because of their size- opening Skim with a few>300MB files really slows my 
machine down ;) On the other hand, reading the native djvu there is no such 
problem.

It's interesting that djvu is apparently so much more efficient than PDF.  I'm 
not too surprised that Skim is slow with a 300MB file.  If the djvu software 
rasterizes all the pages (just a guess from looking at the documentation), the 
PDF is going to be really inefficient.  Are the resulting PDFs searchable?  If 
so, can you repurpose them with pstill or ghostscript to get a smaller PDF?  
Conversion of text to paths could also make things bigger and slower, I think.
Most of the djvu's I read are just scans with no text- but they apparently can have a text layer (making them searchable)- I wouldn't think there would be any advantage in using djvu over pdf if you had the full text (perhaps if you were doing some ocr and needed the text with the scanned image...). From what I gather the djvu format uses a wavelet compression technique with layers which represents scanned text and line drawings highly efficiently. The conversion to pdf (I think) involves rasterization to tiff images and then converting those images to pdf with ghostscript- so, yes, I can change the dpi settings during conversion to get a smaller pdf, but the resulting quality is far inferior to the djvu.

The technical arguments are more of an issue since Skim gets its pdf support 
for free from PDFKit, and no such support is currently available for djvu 
files. However, there are gpl libraries available for reading and displaying 
djvu files and if they could be coaxed into a framework which provided 
something like the functionality of PDFKit, then surely including support in 
Skim would be a very simple job?

GPL code cannot be included in Skim.  LGPL libraries could be linked.


Ok, but Skim is bsd licensed, is it not? So one could distribute an application 
with bsd Skim code and gpl djvu code?

Nope.  Skim would have to be relicensed under the GPL.

Not sure what the 'Nope' applies to here. Skim's 'About box' tells me it is BSD licensed, which means it could exist quite happily with gpl2 code (certainly forking and relicensing under gpl would seem to be a possibility?).

If I get more time I might look into the technical details a little more- 
otherwise I'll just bite the bullet and ditch djvu in favour of pdf.

To make it work with Skim, you'd have to convert djvu to PDF internally; all 
the annotation code, searching, viewing (and object model) is PDF-specific, or 
at least PDF Kit-specific.  In view of that and the licensing issues, you 
really need to write a new application.  Writing a basic viewer looks pretty 
reasonable, since it looks like you'd basically be working a multiple-page 
bitmap image.  Making it fast would probably be a fair amount of work.



That's fair enough- perhaps it would be better to try to improve the existing djvu readers on the mac, instead of trying to add the functionality to Skim.

regards

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to