Case Study:

Markdown to PDF Conversion Using Formatter (FLX STYLE) 

Overview

Username: FLX STYLE Co., LTD
Product type: CSS Formatter V6
License type: Stand-alone license
Operation start time: March 2019
Development company: In-house development

Markdown to PDF conversion case study using Formatter (PDF)

This document is a case study for anyone with the following objectives:

  • To create reports accompanying software development in Visual Studio Code
  • To write a document in Markdown and submit it as PDF
  • To make PDF build complete with command line operation only
  • To style like Markdown display on GitHub
  • To add a cover, table of contents, and page numbers in PDF
  • To automatically generate item titles, page numbers, and links within documents in the table of contents
  • To put page numbers only on the text pages, excluding the cover and the table of contents
  • To not include extra properties in PDF

The study introduces the work flow used to obtain a PDF that meets all the above requirements. (If some of the above requirements are not needed, there may also be different work flows.)
The complete set of source files used to create this PDF is available on GitHub, so you can actually experience building a Markdown manuscript into a PDF.

https://github.com/2SC1815J/md2pdf (Japanese Version)
https://github.com/2SC1815J/md2pdf/tree/en (English Version)

Reason for choosing Formatter

The well-known methods for converting Markdown to PDF include using the rendering function of a browser and generating PDF through LaTeX using Pandoc. However, the browser may have limited typesetting capabilities and may require operations with a graphical user interface, and Pandoc requires TeX knowledge for adjusting the appearance. CSS Formatter was used because of the following features:

• The formatter may do processing such as putting page numbers except on the cover and the table of contents

• Completely command line operation, making it easy to build repeatedly

• You can adjust the look of the PDF without knowing TeX