You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.3 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# web-to-print"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## HTML → PDF \n",
"\n",
"HTML can be used as an environment to make PDFs. HTML5 pages are used to structure and mark up material, for example by adding headers, footnotes, images and adding bolds and italics to the text. In combination with CSS3 and the Paged Media CSS rules to create lay-outs and work on the styling of the documents. \n",
"\n",
"There is not one way to work with web-to-print technologies. There are different tools being developed that each come with their specific features, culture and context.\n",
"\n",
"* CTRL + p\n",
"* [Weasyprint](https://weasyprint.org/) ([Kozea](https://kozea.fr/)/[CourtBouillon](https://www.courtbouillon.org/), FR)\n",
"* [Paged.js](https://www.pagedjs.org/) ([Coko Foundation](https://coko.foundation/), NZ/*)\n",
"* wkhtmltoprint\n",
"* [html2print](http://osp.kitchen/tools/html2print/) ([OSP](osp.kitchen/), BE)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Standardization\n",
"\n",
"The W3C Foundation plays an important role in the devlopment of web-to-print techniques. This organisation works on the open standards of the web, which means that they define how the HTML5 and CSS3 standards look like and can push for standardizing certain functionalities. Once a W3C is accepted, it is very likely that different browsers will adapt such feature. \n",
"\n",
"One of the biggest struggles with web-to-print techniques is that not all browsers support the same CSS3 standards and that browsers use different PDF engines to render PDF documents. Safari is based on WebKit (developped by Apple), Firefox is based on Gecko (developed by Mozilla) and Chrome is based on Blink (developed by Google). Each of these browser engines render web pages ánd PDF document slightly differently, as they implement and render HTML5 and CSS3 rules in different ways.\n",
"\n",
"![](img/browser-engines.png)\n",
"\n",
"<https://en.wikipedia.org/wiki/Comparison_of_browser_engines>\n",
"\n",
"As an example, we can look at the support for the @page Paged Media CSS3 rules, that can be used to set the page size, orientation and margin of a PDF document. \n",
"\n",
"![](img/browser-support.png)\n",
"\n",
"<https://developer.mozilla.org/en-US/docs/Web/CSS/@page#browser_compatibility>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Story of OSP Kit\n",
"\n",
"OSP Kit, CSS regions, multiple textflow support\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Promiscuous publishing & limits"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}