15. Publishing PDF portable documents

In 2015, the South Korean manufacturer giant Samsung produced the Odroid-XU4, a low-powered-credit-card-size single board computer. It can run modern open-source operating systems such as Linux and Android. The standard hardware packs an octa-core Heterogeneous Multi-Processing ARM-based CPU, 2GB of high-speed RAM, 2x full-sized USB3.0 ports, Gigabit Ethernet and more into a fully functional computer operating on only 5 volts of power!

From software perspective, the Odroid-XU4 is a new generation of single board computer that has eight (8) processors. 2 Gigabytes of high-speed memory can run most if not all programs on Linux platform. The USB ports provide high-speed access to external storage devices. Because of inherent design requirements of low power, in terms of processing speed, ARM CPUs are a lot slower than traditional desktop Intel CPUs. However, an 8-cpu board is slightly faster than a power-hungry modern Intel 2-core cpu.

This project builds a server-based publishing platform to create PDF documents of publication quality. Documents in PDF format are portable and can be viewed on any computer, tablet, or phone device, regardless of the operating system. Because of this inherent advantage, it is more economical to employ modern open-source web-based technology to publish documents in this cross-platform PDF format.

wkhtmltopdf can create documents in this format accurately from documents prepared in web language html, css, and javascript. The following steps need to be successfully finalized before this software can be utilized effectively.
1. Build a fully configured Linux platform. I am biased toward Fedora Core since the installation commands and software packaging are significantly different from the manufacturer’s provided OS (Ubuntu). The platform to be built and tested is Fedora Core 20. Since this is a headless server, as soon as SSH and yum works, we can have a fully functional system for our purposes.
2. Build wkhtmltopdf from source. This is a requirement since pre-built binaries are for Intel processors only.
3. Build jsxgraph and Mathjax for mathematical and scientific symbols.
4. Basic understanding of css and html are useful but not required to build the basic layout for a typical publication in PDF. Even though programming skill is essential to make the process more controllable, it is not required to publish only text-based publication that do not use special symbols, formatting, charts, and graphs.

wkhtmltopdf is a software tool to convert html documents to pdf format using the open-source WebKit package. It works with most html, css, and fairly complex javascript codes. This package is chosen over comparable packages such as phantomjs or slimerjs due to its ability to render graphic images produced by jsxgraph and Mathjax.
wkhtmltopdf Bugs & Features
The following issues with wkhtmltopdf v2.12 may arise due to possible problems in either WebKit, the Qt port, incomplete or incomprehensible documentation of the software, or my own usage errors. However, being aware of these issues will bypass all obstacles to create an error-free document.
1. wkhtmltopdf uses the WebKit rendering engine which is not designed for the printed page.
2. A margin of 1 cm is the default margin.
3. Take advantage of the flexibility of css, use percentage instead of a fixed unit such as mm or cm.
4. Design your own footer and header.
5. Use white instead of color margin, wall-to-wall color is nothing other than inviting trouble if this is a design requirement.
6. Shorten formatting or repetitive section of codes by using javascript.
Group as many formatting blocks in javascript as possible to see the html page outline structure. css styling should be placed outside the html document in a .css file.
7. Since you are the publisher, choose the fonts which are legible and appropriate for your contents. Character subsets of one or more chosen typefaces can be embedded in the document so that the documentation looks the same on all computer platforms.

Whether you want to make a brochure having only a few pages or a complete book with table of contents, once the process is understood, you will be able to self-publish publication quality with little or no cost. The following PDF document demonstrates a typical 2-column book layout can be accurately created using simple html, css, and some javascript. You can create similar layout by using only the following html and css tags.

You will need basic knowledge of at least several of the required components listed on this page.

Only essential concepts of the following technology required to get the job done are covered. These basic steps should help you build a solid foundation to further advance your skills and knowledge of modern web technology.
1. html, to hold the page contents (text, images, charts, graph, etc.).
2. css, rules to present and layout the pages.
3. javascript, basic knowledge to automate certain tasks.
4. jsxgraph, geometric drawing, basic chart and graphs.
helper library to simplify usage, common graphs, and customize functions (charts and graphs), interactive geometry to generate codes required for wkhtmltopdf rendering.
First book: Learn programming html/css/javascript with jsxgraph.
Interactive jsxgraph to generate the final page codes (without coding).
5. notepad++ or an equivalent text editor.
6. mathjax, special mathematic and typesetting symbols.
7. wordpress, page previewing, html code debugging.
8. webKit wkhtmltopdf, pdf publishing.
9. Hardware platform (Linux, http, MySQL, php, python)
10.Optional google charts, webGL.
11.Stand-alone hardware platform.

1. DVD specifications,
2. math worksheets.
3. interactive jsxgraph, generate required javascript to use jsxgraph and google charts. Learn only the HTML/CSS/Javascript part needed for implementation of the graphic. This is needed to generate calculus/sage math exercises sheets.
documentation of sourceforge most popular projects.
4. wordpress theme customization. Learn only necessary database and php.