With version 3.5, Fidus Writer is switching to Vivliostyle for PDF generation. Vivliostyle is a Japan-based open source project to do PDF rendering using browser technology. The main person behind Vivliostyle is Shinyu Murakami from the northern Japanese town of Sendai, now living with his wife, a speech therapist and book author, in Saitama near Tokyo. Murakami is a long-time advocate of combining page rendering and browser technology and he is known for his enthusiasm for using the technology that is used to define styles on web pages, Cascading Stylesheets (CSS), also for paginated content. I have asked him to share some of perspective with our readers.
A few years, I was working on a project to create better print output when using the print dialog in browsers. My system could add page headers, page numbers, footnotes and a few other things and it had taken me about a year to build. For me this was a way of getting around paying high license fees for a PDF formatting solution.
Still, I knew what I was doing was fairly limited and probably not useful to anyone else. So I was fairly surprised when suddenly one day in late 2014 I received an email from you about starting Vivliostyle. At this stage you were already a known entity in this space and had built up a career in PDF page rendering. Could you give us an idea of what the state of PDF rendering was in at that time and why did you choose to contact me?
Before starting the Vivliostyle project, I was involved in developing another typesetting engine. Its product is a commercial proprietary software that supports CSS Paged Media specification and can generate high quality PDF. However, I thought that what was needed was a system that was open source and worked on the Web. That’s how I came up with a new project: “Vivliostyle”. I had read an article on O’Reilly Media’s Tools of Change for Publishing, and knew of the existence of “BookJS”, and I was confident that the book typesetting on the browser would work. So I thought I wanted to advance the project together if possible, and I contacted the developer behind it – you.
When you had set up Vivliostyle, you and the development team chose not to continue building on the source code I had built up but started on a different project. What was behind that decision?
What we were aiming for is CSS allows us to achieve a free page layout. As well as supporting the CSS Paged Media specification already implemented in commercial CSS typesetting engines, I wanted to support more advanced page layout features in CSS, which were going to be standardized in W3C.
We considered whether to create something from scratch by ourselves or based on existing open source.
Your “BookJS” (also known as Pagination.js, followed by SimplePagination.js) was an epoch-making thing that enabled book typesetting in JavaScript, but it had some built-in limitations. For example, layout customizations had to be configured in JavaScript instead of CSS.
That’s when I looked at the EPUB Adaptive Layout specification which was proposed by Peter Sorotokin (previously of Adobe, at that stage working for Google) to extend CSS for EPUB page layout. He had written an implementation in JavaScript. It was attractive for us, because it allowed us to specify the page layout with the new CSS feature called “page templates”. I thought that it would be easier to add CSS Paged Media and related CSS specifications to this already existing JS implementation so that we could make it useful for printed publications as well.
Vivliostyle was initially a subsidiary of a larger company active in this space. It was then a startup. Now most recently the startup has changed names and the Vivliostyle open source project is governing through a non-profit model. What was behind those changes, and what difference should it make for those potentially using Vivliostyle what organizational model Vivliostyle is being programmed under?
At first, I started Vivliostyle with support from the parent company that I had worked at previously. Then we became an independent startup company supported by others.
Our business model was to generate revenue by selling a commercial license and consulting for user companies in addition to the open source development.
Unfortunately, it gradually became more difficult to spend time on the development of the open source product for the management of the company, so its development stagnated.
At that stage it was better for both parties to break up with a company for profit-making and a nonprofit open source project organization. The name of the company and the brand of the commercial product changed (the company to Trim-marks Inc. and the product to VersaType), and the name Vivliostyle was kept only for the open source project.
For the open source Vivliostyle project we have set up a new nonprofit organization Vivliostyle Foundation. Now that we have this new division, we are very much interested in engaging with collaborators on the Vivliostyle project and I expect that the number of contributors to development will increase.
Also the license of Vivliostyle has changed. Initially it was Apache, now it is AGPL. Does that mean one cannot use it to write commercial books, or what are the implications? And what was the idea behind the license change?
Initially we developed Vivliostyle under the Apache license. This had been the license of the project we built upon (Adaptive Layout), so we just continued with that.
Later we changed it to AGPL. The change was based on the company’s policy dealing with both an open source version and commercially licensed version.
Then this year, the open source Vivliostyle project left the company, but it has taken over the AGPL license. This is because the copyright of the source code of the part developed under that company is retained by the company – now known as Trim-marks Inc. .
The AGPL license means that if you modify the source code to make it a different product or embed it in a Web service, you are obliged to disclose the modified source code. But there is no issue creating commercial books by using Vivliostyle as it is, and one can also use other services, such as Fidus Writer, that in turn use Vivliostyle for print or PDF generation without restrictions.
Right from the start you were very interested in standardization of features. The first time we met in person was at a World Wide Web Consortium (W3C) CSS Working Group (CSSWG) meeting in Australia and subsequently Vivliostyle had me work on specifications on page floats. At the time there were several fairly large PDF renderers that did not actively engage in standardization work. Now most recently when you started the Vivliostyle Foundation, you invited Florian Rivoal, a central Invited Expert in the CSSWG, and myself, an Invited Expert in the Editing Taskforce, to join you as directors. Why is it so important for you to standardize features related to pagination? Especially for a startup doesn’t that hinder you in creating new features that are unique to your project?
The specifications of the standards needed to format books with only HTML and CSS are not yet been completed. In a way that makes it possible for some vendors to just ignore the standards and implement certain features in a way that is unique to their software.
I don’t think that is the way to go though, as it may work to satisfy current needs, but it will be incompatible with the standards once they are available and one will need to throw a lot away.
So with Vivliostyle we decided that instead we wanted to be actively involved in defining the standards, while simultaneously working on developing Vivliostyle to stay as close as possible to what will later become the standard.
When you talk about “throw[ing] a lot away” are you thinking of content that has been created for the proprietary software that is no longer working and therefore has to be reformatted to be usable again, or are you thinking of the programming code that went into building the app that now has to be reprogrammed to work with the standard?
Both software and content will be affected. Vendors often keep supporting non-standard features for their existing users after new standards become available. It’s a pain for such vendors to implement new standards keeping old non-standard ones, but if they don’t implement new standards, they will lose new users who want to use new standards.
When you first started Vivliostyle, what kinds of use cases did you foresee? Is that also how Vivliostyle is actually being used now?
When I started Vivliostyle, I thought that in the future it would be used in a wide range of applications that require page layout, combining visual editing and layout tools in the web browser, but first of all, Vivliostyle should be useful for HTML-centric content such as Web and EPUB when print page layout is required.
As it has turned out so far, Vivliostyle and the commercial spin of brand, are being used in mainly three areas of publishing: Academic journals, product catalogs and manuals, and technical books.
In the case of technical books, in addition to commercial publications, Vivliostyle is used to make self-published technical books that engineers publish on their own. Engineers often know HTML and CSS, so they prefer Vivliostyle as they can avoid to use difficult typesetting software.
There are still many areas in publishing where Vivliostyle is still not being used. This is really because Vivliostyle is not able to do everything that is needed or that the usability is lacking. For example, PDF generation depends on the print/PDF output functionality of web browsers – which is not of very high quality. That translates into a limitation for us.
Vivliostyle can currently be used both for PDF generation and for showing pages in the browser, for example in the case of epubs. What do you see the next major goal of Vivliostyle?
True, Vivliostyle can not only generate PDFs but also be used as a viewer app to display paginated content in browser. For example, it can also be a viewer for documents consisting of multiple HTML files or EPUBs.
In the future, we will support Web Publications that are being standardized by the W3C Publishing Working Group. The use of Vivliostyle as a web publication viewer will make page layout better and it will make possible to create web publications and printed publications at the same time.
Vivliostyle seems to be a good fit for Fidus Writer and probably also other text editing applications. Who else do you think could benefit from adding Vivliostyle to their web site or app?
There are also other text editors for publishing embedding Vivliostyle: Viola is an online editor for printing and publishing that uses Vivliostyle and there is the Markdown Book Preview (MDBP) which allows users to preview texts written in markdown using Vivliostyle.
Other than text editors, Vivliostyle is useful in online ebook viewers and all kinds of apps that do report generation with preview and printing.
Also, by using Vivliostyle Viewer on the website, you can make HTML content readable by pagination as well as scrolling, or add page layout for printing.
As the standardization of Web Publications in W3C progresses, Vivliostyle will be useful as a viewer of such publications and as a way to incorporate it into web publication authoring tools.
Thank you so much for this very insightful interview! I am looking forward to hearing how our users receive Vivliostyle and what more they hope to get from it.
Thank you!