- Scrivener now contains a brand new, native, in-house converter for Word .docx files (affecting import, export and Compile). Because this converter has not yet been tested widely enough, it is turned off by default - by default Scrivener still uses the mature Java-based converters from third-party company Aspose, as it has been doing for several years now. If you would like to test the new converters, open Preferences and then, under Sharing > Conversion, turn off “Use enhanced converters for Microsoft Word and OpenOffice documents”. This will turn off the Aspose Java converters, causing Scrivener to use the new in-house .docx converter instead. (Note that this will also result in poor OpenOffice conversions, however.)
- When the Java-based Aspose converters for creating Word and Office files fail, Scrivener now shows a message to warn the user that Apple’s more basic converters will be used instead.
- When the Aspose converters fail, Scrivener now falls back on the in-house converter rather than the low-fidelity Apple converter.
Converting to and from Word format is an important feature of Scrivener, but it's not actually that easy to do. Apple provides some standard converters, but they are terrible - they don't support images, comments or footnotes, they lose line spacing, and they obliterate other formatting (needless to say, Apple does not use them in its own apps). For the past few years, therefore, Scrivener has used a third-party, Java-based converter (from Aspose) for importing and exporting DOCX files. Apple's own converter is only ever used if the Java converter fails for some reason; you could also force Scrivener to use Apple's converter instead of the Java-based one by turning off "Use enhanced converters for Microsoft Word and Office documents" in Scrivener's Sharing > Conversion preferences.
The Aspose Java-based converters work very well, but as Apple tightens app security, my fear is that it is eventually going to be very difficult to call a Java app from a Cocoa one.
Meanwhile, on iOS, things are even more difficult: Apple's own semi-functional converter isn't even available there, and it's not possible to build in and invoke a separate Java process as you can on the Mac. For our iOS version, then, I built my own .docx converter that did just enough - everything that the iOS version required. This involved getting fairly familiar with the OfficeOpenXML docs and writing a lot of XML code. Fun!
Over the past few months, I have begun to expand on that work by making it cross-platform (Mac and iOS rather than just iOS) and adding to it support for everything that the Mac version of Scrivener needs for its many Compile features. As a result of this work, as of Scrivener 3.1.2, Scrivener now uses my own custom .docx converters when the Java converters either fail or are turned off via the Preferences.
Building these converters to do everything required for the Mac version has been quite complex, and they require a lot more testing. At some point, they may well replace the Java converters for .docx conversion, but they need more real-world use first. I'd therefore be grateful to anyone who is feeling intrepid or experimental enough to use them instead of the Java converters and report any issues with them.
To test out my custom converter, all you need to do is this:
1. Open Scrivener's Preferences (Scrivener > Preferences...).
2. Click on "Sharing" in the Preferences panel toolbar.
3. Select "Conversion".
4. Deselect "Use enhanced converters for Microsoft Word and OpenOffice documents." (Note that the information under this checkbox is currently misleading when it comes to .docx - it says that if you un-tick it, the macOS standard converters will be used and you may lose formatting. This is no longer true, but I'll be leaving the text like this to discourage users turning off the setting until I know my own converters are rock solid.)
Important Note: If you turn off this setting. the standard macOS converters *will* be used for OpenOffice and legacy .doc files, so only do this if you don't use those formats much.
We have tested lots of documents using our own converter and it should be working well, creating and importing documents just as well as the Java converter. However, it is brand new and there are bound to be issues we have missed, so we're thankful for any issues you find and report - please post anything you find in a reply to this thread, or email us at mac.support AT literatureandlatte.com. And of course, if you do find any show-stopping bugs, you can easily switch back to using the Java-based converters.
Thanks and all the best,