ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.98k stars 336 forks source link

[Feature request] Save to DJVU (low priority) #60

Open vatterspun opened 7 years ago

vatterspun commented 7 years ago

What is the current behavior? Currently the program will open DJVU, PDF, and XPS files, but only save to PDF. Nobody uses XPS of course but there are a long list of positive benefits to DJVU including being smaller and more open.

Workaround There are plenty of PDF-to-DJVU converters, but some of them likely reduce document resolution in that process.

Which versions of DesktopEditors, and which OS are affected by this issue? Maybe other installs have the format but Win7x64 can't do this.


Update: As requested later in the thread, someone asked me to generate the following:

Use case

As someone who works with a lot of scanned documents, DJVU has advanced compression to create smaller files with searchable text layer. Since ONLYOFFICE has functionality to open the file, it seemed reasonable to also request the ability to edit and save to DJVU.

diazbastian commented 7 years ago

I don't see a real advantage for the addition whose benefits outweigh the effort required. DjVu is a good format whose objectives differ from those of PDF, for example it is a good format for scanning (large) documents. On the other hand, currently PDF is as open as DjVu and if you use the ISO standard a large number of devices can open a PDF document without problems.

Consider that PDF adds other desirable features such as a portable document format, such as signatures, embedding other types of content (such as a document in another format, audio, video, etc.). I think it is better to maintain a single export format and polish it in supported features than to maintain two formats that, basically, propose to do the same.

There are plenty of PDF-to-DJVU converters, but some of them likely reduce document resolution in that process.

This is due to the features of the format. DjVu is a raster graphics format, so basically when creating a file in DjVu format the maximum size is a fixed value. If it is a lower value you will get low resolution documents as opposed to PDF being a vector graphics format.

vatterspun commented 7 years ago

I can't speak to the raster vs. vector issues you mention -- I'm not close enough to the format. I also can't find any clear delineation between the openness of PDF and DJVU formats. The latter is GPL with some applicable corporate patents, but the former has some ISO certs, which again steps out of my expertise.

I think it is better to maintain a single export format and polish it in supported features than to maintain two formats that, basically, propose to do the same.

This is one of those chicken-before-egg moments where if no one supports the format, it gets no attention and doesn't improve. Ultimately ONLYOFFICE may have to make a decision about what formats it supports and why. GIMP, LibreOffice, and many other open tools basically play like a huge toolbox and just throw in all the formats.

Additionally, the dominance of PDF means free money for Adobe, who makes a poor Acrobat client, sells it for crazy $, and most companies (that I've worked for) remain blissfully unaware of alternatives. It's possible DJVU is not the solution to this admittedly much larger problem, but if unseating dominant office toolsets is a goal, DJVU support might be one route.

One workaround may be to include a basic export tool, include some warning about "unsupported format" and just see how users react to it.

diazbastian commented 7 years ago

@vatterspun

This is one of those chicken-before-egg moments where if no one supports the format, it gets no attention and doesn't improve

I don't agree, each format follows its own path and its development is independent. Unfortunately the popularity of one versus the other defines that it is better in addition to the advantages and disadvantages of each. For example, DjVu is a better format than PDF to create scanned multipage documents, but it is not the case of OnlyOffice use, where the PDF format is more advantageous than DjVu.

Additionally, the dominance of PDF means free money for Adobe, who makes a poor Acrobat client, sells it for crazy $, and most companies (that I've worked for) remain blissfully unaware of alternatives. It's possible DJVU is not the solution to this admittedly much larger problem, but if unseating dominant office toolsets is a goal, DJVU support might be one route.

Maybe you are confusing about some things, since PDF is an open format and an international standard, so there are many free implementations to manipulate PDF documents with their own licenses (mostly free/opensource), so applications like Calligra, LibreOffice, Gimp or Inkscape don't have to pay anything to Adobe ... only you should pay Adobe if you use their software.

A similar discussion was given in the LibreOffice bugzilla and it was determined that it is useful but low priority to support the DjVu format to import them into Draw, but it doesn't make sense to create an export filter (PDF is a better alternative to DjVu multi-page and PNG/JPG/WebP a better alternative to DjVu image). Other applications like the ones you mentioned, don't have native support for DjVu documents either.

vatterspun commented 7 years ago

Thanks for the reply ... good discussion ...

DjVu is a better format than PDF to create scanned multipage documents, but it is not the case of OnlyOffice use, where the PDF format is more advantageous

I don't think it's safe to say that every use of ONLYOFFICE will not be similar to scanned, multi-page documents. I acknowledge it's low priority, hence the issue title.

PDF is an open format and an international standard

No, I was actually referring to the way that Adobe is considered the default place to go for PDF tools. I'm frustrated that, although there are other tools available, PDF is synonymous with Adobe. Nitro and Foxit both make very solid commercial alternatives that are far better but get little spotlight in my experience.

Anyway, I did a bit of digging and found the reason why I didn't think that PDF was open: Adobe charged Microsoft a fee for it and then when Microsoft didn't like the price, they declined to allow it's use in Office back in 2006 https://www.cnet.com/news/microsoft-adobe-squabble-over-pdf/ ... it's not that open if Adobe can charge for it.

I'm aware of a wide variety of open and free tools (PDFTK, pdf2htmlEX, etc.) use PDF without some kind of extra fee, but I'm not sure ONLYOFFICE fits this profile. As ONLYOFFICE is a freemium product (basic software with a paid server component), Adobe might exert some pricing requirement in the future at which time even an imperfect alternative would be helpful.

A bit more digging seems to suggest PDF is only sort of open: https://www.reddit.com/r/libreoffice/comments/5yp572/why_libreoffice_is_not_able_to_export_documents/

vatterspun commented 7 years ago

I've continued digging since my original post and I'm starting to see the dilemma more clearly. The DJVU appears to be more open and lacks many of the licensing issues around font usage and other concerns, but it looks more similar to a multi-page TIFF file with a text layer. Almost anything created in the presentation tool for example would not look good in DJVU unless saved at very high resolution.

I still think there's a use case for it's inclusion, however:

Taking into consideration the specific features of each format as well as its advantages, DjVu and PDF cannot be considered rival formats as they are designed for solving different tasks and therefore complementing each other.

http://www.novapdf.com/kb/convert-djvu-to-pdf-215.html#djvu-pdf

diazbastian commented 7 years ago

I don't think it's safe to say that every use of ONLYOFFICE will not be similar to scanned, multi-page documents.

So what would be a specific use case for OnlyOffice that only DjVu could solve? I ask the question in that way, since most of the cases of use that DjVu would solve also solve PDF with greater advantages.

...I was actually referring to the way that Adobe is considered the default place to go for PDF tools

Well, you can't do anything about what people do or think.

it's not that open if Adobe can charge for it.

Come on, an antitrust riff has nothing to do with the ISO PDF specification.

Adobe might exert some pricing requirement in the future at which time even an imperfect alternative would be helpful.

That is a speculation without a handle. In the most unlikely case, the entire industry moves to another format, including OXPS (which is more advantageous than DjVu for office software). The open specification evolves more slowly than the extended specification (which is why current versions of Adobe PDF offer more features, which may be a standard in the future). The same happens with other open formats such as ODF and OOXML.

If you look at the last link, you will see that I opened some tickets in LO bugzilla, however, after many discussions in the mailing lists, I decided what I said above in another post (I don't know why the tickets are still there). Whatever it is, years have passed and things have not changed much.

PDF is the most widespread portable format, best known and most used in office software. Probably if you send a DjVu multi-page document to a friend, he don't know what it is or how to open it. DjVu is very niche format and just having an import filter in OnlyOffice is smart, because it allows you to recover the content and convert it to a manageable format by the software (it is the same principle of The Document Liberation Project).

...more open and lacks many of the licensing issues around font usage and other concerns

I don't know what "more open" means to you (see the disadvantages section about commercial use for DjVu in the link that you shared). Regarding the other issues mentioned, it is more of a problem on the user's side. With this I mean that many open formats can have problems with the licenses of the fonts or other content if the user doesn't care about this issue. For example, you can create a *.odt document and embed the "Calibri" font and share it with a friend, but if your friend manipulate the document with that fonts or create a new document with that font without having an MS Office license, he would be incurring a fault (sounds silly, but that's what they refer to).

The solution? In addition to using a known (and open) format, the content is also open and without licensing problems (audio/video, fonts, images, etc.). Basically the mentioned problems are about what "could allow" those formats and not something that happens by design.

-- I would recommend that you do a thorough investigation before continuing to comment. The industry doesn't need an alternative to the short and medium term and you are requesting something that other office software don't do.

vatterspun commented 7 years ago

I would recommend that you do a thorough investigation before continuing to comment.

Not getting paid to do this, just suggesting things that I thought would help, and don't appreciate being called stupid. I think you're ignoring some solid points that I'm making because they don't correspond to what you walked into the discussion with. I'll update the initial post with a use case -- that's a great idea.

diazbastian commented 7 years ago

and don't appreciate being called stupid.

It is not necessary to put words where there are none.

I think you're ignoring some solid points

I don't know what those solid points are that you say, anyway I already gave my opinion.

10-4

vatterspun commented 7 years ago

It is not necessary to put words where there are none.

Well, I can read between the lines such as:

I don't know what those solid points are that you say

Zing!

charlesjt commented 7 years ago

"just having an import filter in OnlyOffice is smart, because it allows you to recover the content and convert it to a manageable format by the software"

This is a perfect summary. That is the point! The 3 main standards are Microsoft XML, Open Document and PDF which are supported by onlyoffice. While I can import "any" document to these 3 formats, it will be a good day.

maruacat commented 6 months ago

Hello, @vatterspun! Sorry for the long wait and thank you for your suggestion.

I've created issue #68231 requesting a conversion function in DJVU format.