SlideShare a Scribd company logo
1 of 48
Download to read offline
PrintCSS
A Quick Walkthrough
Andreas Jung (ZOPYX)

info@zopyx.com

www.print-css.rocks
XMLPrague 2020
1 https:!//cutt.ly/jrIh5TI
AGENDA
‣ What is PrintCSS?
‣ Overview and tools
‣ Examples and usecases
‣ print-css.rocks project
‣ Basic and common "PrintCSS" features
‣ Demo time
‣ The missing parts and the bad parts
‣ Q & A
2
ANDREAS JUNG
‣ Master in Computer Science and Electrical Engineering
‣ background in electronic publishing since 1995
‣ freelancer since 2004
‣ large scale content management based on Plone CMS
‣ individual Python software development
‣ conversion workflows and publishing solutions
3
ANDREAS JUNG
‣Produce & Publish -
www.produce-and-publish.com
‣Collaborative content solutions based on Smashdocs -
www.creating-content-together.com
‣XML-Director foundation for XML CMS solutions -
www.xml-director.info
‣PrintCSS tutorial -
www.print-css.rocks
My projects:
4
What is "PrintCSS"?
5
WHAT IS "PRINTCSS"?
‣ "PrintCSS" = XML/HTML + CSS →PDF
‣ Browser "Print" is not "PrintCSS"
‣ "PrintCSS" deals with print specific aspects
‣ "paper" layout information
‣ counters and page numbers
‣ page areas
‣ pagination
‣ footnotes
‣ …
6
PRINTCSS AKA CSS PAGED MEDIA
‣ Draft: CSS Paged Media Module Level 3 (2018)
‣ Draft: CSS Generated Content for Paged Media Module (2014)
‣ Concepts
‣ Content: XML or HTML
‣ Design and layout: Cascading Stylesheets CSS
‣ Rule-based approach for defining all aspects of automatic typesetting
‣ separation between content and styling
‣ CSS Paged Media vs. XSL-FO
‣ easy approachability in general
‣ less complex than XSL-FO (CSS as foundation is common knowledge)
7
"CSS PAGED MEDIA" TOOLS
‣ WeasyPrint
‣ PrinceXML
‣ PDFreactor
‣ Antennahouse
‣ pdfChip
‣ Versatype (ex Vivliostyle)
8
TOOLS - PRICING VS FEATURES
9
TOOLS - PRICING VS FEATURES
Weasy

print
Prince PDFreactor
Antenna-
house
(pdfChip)
Personal

(commercial)
free 495 USD 1.250 USD
Personal

(non commercial)
free free free
Server free
3.800 USD

(∞ CPU?)
2.950 USD

(4 CPU)
5.000 USD

(1st CPU)
5.000 €

- 25.000 €
Server (EDU) free 1.900 USD 2.065 USD
10
Some examples
and use case
11
EXAMPLE: CATALOG PRODUCTION
Source: Bösch Preisliste via PDFreactor 12
EXAMPLE: LAYOUT-ORIENTED PUBLICATION
Source: Konzepte-IS via PDFreactor 13
EXAMPLE: INTERNATIONAL STUDIES
Source: Stiftung Wirtschaft und Politik (SWP) via Antennahouse14
EXAMPLE: DATABASE-DRIVING PUBLICATIONS
Source: EUROPEAN PHARMACOPOEIA via PDFreactor15
‣ vendor-neutral information about "PrintCSS"
‣ information about tools
‣ tested tools:
‣ PrinceXML
‣ Antennahouse
‣ PDFreactor
‣ WeasyPrint
‣ tutorial and lessons
‣ "PrintCSS" related resources
‣ www.print-css.rocks
16
LESSONS
17
CONVERTER RESULTS
18
HTML INPUT
19
CSS INPUT
20
Basic and common
"PrintCSS" features
21
MULTI-COLUMNS AND FOOTNOTES
‣ ✅ multi-column support
‣ ✅ footnote support
‣ footnotes within the
same column
‣ ✅ AH, Prince
‣ 🚫 PDFreactor
22
BASELINE GRID
‣Placement of text within a given grid
‣supported by all tools
‣vendor-specific implementation
23
FLOATS (1/3)
‣ (automatic) moving of block elements (images,
tables, inserts)
‣ within the current page
‣ within the current column set
‣ to the next page
‣ colspan optional
‣ AH: most complete, but complex extension
‣ Prince, PDFreactor: partial support
24
FLOATS (2/3)
25
FLOATS (3/3)
26
IMAGES
‣ Bitmap images: JPEG, PNG, GIF, TIFF
‣ Vector formats: PDF, SVG
‣ Color spaces: RGB, CMYK, ICC profiles
‣ Problems:
‣ auto-placement
‣ automatic (down)-scaling
27
PAGINATION
‣ automatic pagination
‣ pagiation hints through CSS
‣ support for orphans and widows
div.chapter {

page-break-after: always;

}
table {

page-break-inside: avoid;

}
div.chapter {

page-break-after: never;

}
div.chapter {

orphans: 2;

widows: 3;

}
28
FONTS
‣ Support for all common font formats
‣ Opentype
‣ Truetype
‣ Google webfonts
‣ Fonts embedded by default into the PDF
29
RTL, VERTICAL RL, ASIAN CONTENT
‣ General support for right to left
‣ General support for vertical RL (JP/CN)
‣ Special fonts usually required with required code points
30
Demo time
What do you want to see?
31
The missing parts.
The bad parts.
32
THE "STANDARD" (1/2)
‣ the W3C "CSS Paged Media" standard defines the
foundation for "PrintCSS"
‣ standards and specifications are years-old, draft status
‣ status of drafts unclear (unmaintained, work-in-
progress, discontinued?)
‣ many vendor specific extensions (development usually
driven by customer needs)
‣ limited cross-platform compatibility and interoperability
33
THE "STANDARD" (2/2)
‣ conflicting implementations
‣ conflicting interpretations of the "standard"
‣ (missing?) test suite(s)
‣ support of modern/new CSS features
‣ in browsers: fast adaptation
‣ in PrintCSS tools: moving (very) slowly
34
(CONSISTENT) JAVASCRIPT SUPPORT
‣ ✅ PrinceXML and PDFreactor
‣ 🚫 Antennahouse
‣ support only for selected JavaScript modules
‣ missing rendering API for hooking into the rendering process
35
FLEX BLOCK AND GRID SYSTEMS
‣ Flex block:
‣ ✅ PrinceXML and PDFreactor
‣ 🚫 Antennahouse
Source: https://css-tricks.com/
36
🚫 SIDE NOTES
Source: CSS Tricks
‣ Antennahouse: own extension
‣ PDFreactor: CSS + JavaScript
‣ PrinceXML: CSS
‣ 🚫 Challenges:
‣ float to inside/outside
‣ side notes in multi-column
environments
‣ positioning
37
🚫 IMAGE POSITIONING (1/2)
‣ Problem:
‣ an image does not fit on the remaining page or
into the remaining column
‣ avoid blank areas
‣ Solutions:
‣ float image on next page or into next column
‣ scale image down to remaining space in column or
on page
38
🚫 IMAGE POSITIONING (2/2)
!/* Prince !*/

#globe {

width: 100%;

float: column-top next;

column-span: 2;

}
!/* Prince !*/

#globe {

width: 100%;

float: column-top next;

}
39
🚫 FIT TEXT INTO A GIVEN BOX
‣ ✅ PDFreactor: Javascript
‣ ✅ Antennahouse:
-ah-overflow-condense: font-stretch | font-size
| letter-spacing;

‣ 🚫 PrinceXML
40
🚫 ISSUES WITH HYPHENATION
‣ hyphenation quality differs by language and tool
‣ breaking of long words/terms (e.g. URLs) often an issue
‣ no standard for hyphenation exceptions
‣ injecting and maintaining hyphenation hints
(e.g. soft-hyphens) is a pain
41
🚫 ISSUES WITH TABLES
‣ tables split over multiple pages
‣ control over repeating headers and footers
‣ custom table captions ("continued….")
‣ controlling page breaks with row spans
42
🚫 MARGIN BOXES/RUNNING ELEMENTS
‣ page margin boxes:
‣ text only, no HTML
‣ one style per margin box
‣ running elements:
‣ content removed from content area
‣ content place in margin box
‣ content duplication often needed
‣ styling of mixed running elements and
generated content is a major pain
43
🚫 EXCLUSIONS
https://www.w3.org/TR/css3-exclusions (2015)
Source: Vivliostyle
44
🚫 DEVELOPING WITH PRINTCSS
‣ no real development tools
‣ rendering process is a blackbox process
‣ content + styles in, PDF out
but what is happening inside and why?
‣ few tracing options for the mortal PrintCSS developer
‣ usually a lengthy, iterative process
‣ no/little support for introspecting the rendering process
‣ no/little support for influencing the rendering process
besides CSS
45
THE ECOSYSTEM
‣ CSS Paged Media tools:
‣ few commercial tools
‣ even fewer non-commercial, free tools
‣ limited options
‣ in-depth evaluation needed for advanced projects
‣ at one point you need to decide and pick one tool
46
Questions?
47
Thank you!
www.print-css.rocks
www.zopyx.com
Andreas Jung <info@zopyx.com>
48

More Related Content

Similar to PrintCSS workshop XMLPrague 2020

TYPO3 5.0 Experience Concept
TYPO3 5.0 Experience ConceptTYPO3 5.0 Experience Concept
TYPO3 5.0 Experience ConceptJens Hoffmann
 
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Henning Jacobs
 
State of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfState of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfAndreas Jung
 
Front-end Web Dev (HK) Info Session
Front-end Web Dev (HK) Info SessionFront-end Web Dev (HK) Info Session
Front-end Web Dev (HK) Info SessionAllison Baum
 
Just Angular (Project experience)
Just Angular (Project experience)Just Angular (Project experience)
Just Angular (Project experience)Kostiantyn Hryshyn
 
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...Publishing Smarter
 
Deep Dive: Oracle WebCenter Content Tips and Traps!
Deep Dive: Oracle WebCenter Content Tips and Traps!Deep Dive: Oracle WebCenter Content Tips and Traps!
Deep Dive: Oracle WebCenter Content Tips and Traps!Brian Huff
 
Understanding PDF workflows
Understanding PDF workflowsUnderstanding PDF workflows
Understanding PDF workflowsVIGCbe
 
Maintainable theming
Maintainable themingMaintainable theming
Maintainable themingWunderkraut
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - DetroitMartin Gutenbrunner
 
Industrializing Machine learning pipelines
Industrializing Machine learning pipelinesIndustrializing Machine learning pipelines
Industrializing Machine learning pipelinesGermain Tanguy
 
From Zero to DITA in about 60 Minutes
From Zero to DITA in about 60 MinutesFrom Zero to DITA in about 60 Minutes
From Zero to DITA in about 60 MinutesPublishing Smarter
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Daniel Bryant
 
Large Scale Production DITA landscape @SAP
Large Scale Production DITA landscape @SAPLarge Scale Production DITA landscape @SAP
Large Scale Production DITA landscape @SAPYoussef Bennani
 
Python the lingua franca of FEWS
Python the lingua franca of FEWSPython the lingua franca of FEWS
Python the lingua franca of FEWSLindsay Millard
 
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...Daniel Bryant
 

Similar to PrintCSS workshop XMLPrague 2020 (20)

TYPO3 5.0 Experience Concept
TYPO3 5.0 Experience ConceptTYPO3 5.0 Experience Concept
TYPO3 5.0 Experience Concept
 
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
 
Fork CMS
Fork CMSFork CMS
Fork CMS
 
State of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfState of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdf
 
Multi model-databases
Multi model-databasesMulti model-databases
Multi model-databases
 
Multi model-databases
Multi model-databasesMulti model-databases
Multi model-databases
 
Front-end Web Dev (HK) Info Session
Front-end Web Dev (HK) Info SessionFront-end Web Dev (HK) Info Session
Front-end Web Dev (HK) Info Session
 
Just Angular (Project experience)
Just Angular (Project experience)Just Angular (Project experience)
Just Angular (Project experience)
 
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...
DITA: From “Do I?” to “Done It!”: An Automotive Case Study that can apply to ...
 
Deep Dive: Oracle WebCenter Content Tips and Traps!
Deep Dive: Oracle WebCenter Content Tips and Traps!Deep Dive: Oracle WebCenter Content Tips and Traps!
Deep Dive: Oracle WebCenter Content Tips and Traps!
 
Understanding PDF workflows
Understanding PDF workflowsUnderstanding PDF workflows
Understanding PDF workflows
 
Maintainable theming
Maintainable themingMaintainable theming
Maintainable theming
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
 
Industrializing Machine learning pipelines
Industrializing Machine learning pipelinesIndustrializing Machine learning pipelines
Industrializing Machine learning pipelines
 
From Zero to DITA in about 60 Minutes
From Zero to DITA in about 60 MinutesFrom Zero to DITA in about 60 Minutes
From Zero to DITA in about 60 Minutes
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"
 
Real solutions, no tricks
Real solutions, no tricksReal solutions, no tricks
Real solutions, no tricks
 
Large Scale Production DITA landscape @SAP
Large Scale Production DITA landscape @SAPLarge Scale Production DITA landscape @SAP
Large Scale Production DITA landscape @SAP
 
Python the lingua franca of FEWS
Python the lingua franca of FEWSPython the lingua franca of FEWS
Python the lingua franca of FEWS
 
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
CloudNativeLondon 2018: "In Search of the Perfect Cloud Native Developer Expe...
 

More from Andreas Jung

Typesense Plone Integration Plone Conference 2022 Namur
Typesense Plone Integration Plone Conference 2022 NamurTypesense Plone Integration Plone Conference 2022 Namur
Typesense Plone Integration Plone Conference 2022 NamurAndreas Jung
 
Onkopedia - Plone Tagung 2020 Dresden
Onkopedia - Plone Tagung 2020 DresdenOnkopedia - Plone Tagung 2020 Dresden
Onkopedia - Plone Tagung 2020 DresdenAndreas Jung
 
Plone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, BelgiumPlone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, BelgiumAndreas Jung
 
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel Onkopedia
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel OnkopediaBack to the future - Plone 5.2 und Python 3 Migration am Beispiel Onkopedia
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel OnkopediaAndreas Jung
 
Plone migrations using plone.restapi
Plone migrations using plone.restapiPlone migrations using plone.restapi
Plone migrations using plone.restapiAndreas Jung
 
Plone Migrationen mit Plone REST API
Plone Migrationen mit Plone REST APIPlone Migrationen mit Plone REST API
Plone Migrationen mit Plone REST APIAndreas Jung
 
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...Andreas Jung
 
Generierung von PDF aus XML/HTML mit PrintCSS
Generierung von PDF aus XML/HTML mit PrintCSSGenerierung von PDF aus XML/HTML mit PrintCSS
Generierung von PDF aus XML/HTML mit PrintCSSAndreas Jung
 
Creating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsCreating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsAndreas Jung
 
Creating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsCreating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsAndreas Jung
 
The Plone and The Blockchain
The Plone and The BlockchainThe Plone and The Blockchain
The Plone and The BlockchainAndreas Jung
 
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCs
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCsContent Gemeinsam Erstellen: Integration Plone mit SMASHDOCs
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCsAndreas Jung
 
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.Andreas Jung
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL DatabaseWhy we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL DatabaseAndreas Jung
 
XML Director - the technical foundation of onkopedia.com
XML Director - the technical foundation of onkopedia.comXML Director - the technical foundation of onkopedia.com
XML Director - the technical foundation of onkopedia.comAndreas Jung
 
Building bridges - Plone Conference 2015 Bucharest
Building bridges   - Plone Conference 2015 BucharestBuilding bridges   - Plone Conference 2015 Bucharest
Building bridges - Plone Conference 2015 BucharestAndreas Jung
 
CSS Paged Media - A review of tools and techniques
CSS Paged Media - A review of tools and techniquesCSS Paged Media - A review of tools and techniques
CSS Paged Media - A review of tools and techniquesAndreas Jung
 
Why Plone Will Die
Why Plone Will DieWhy Plone Will Die
Why Plone Will DieAndreas Jung
 
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...Andreas Jung
 

More from Andreas Jung (20)

Typesense Plone Integration Plone Conference 2022 Namur
Typesense Plone Integration Plone Conference 2022 NamurTypesense Plone Integration Plone Conference 2022 Namur
Typesense Plone Integration Plone Conference 2022 Namur
 
Onkopedia - Plone Tagung 2020 Dresden
Onkopedia - Plone Tagung 2020 DresdenOnkopedia - Plone Tagung 2020 Dresden
Onkopedia - Plone Tagung 2020 Dresden
 
Plone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, BelgiumPlone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, Belgium
 
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel Onkopedia
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel OnkopediaBack to the future - Plone 5.2 und Python 3 Migration am Beispiel Onkopedia
Back to the future - Plone 5.2 und Python 3 Migration am Beispiel Onkopedia
 
Plone migrations using plone.restapi
Plone migrations using plone.restapiPlone migrations using plone.restapi
Plone migrations using plone.restapi
 
Plone Migrationen mit Plone REST API
Plone Migrationen mit Plone REST APIPlone Migrationen mit Plone REST API
Plone Migrationen mit Plone REST API
 
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...
Plone im Einsatz bei der Universität des Saarländes als Shop-System und Gefah...
 
Generierung von PDF aus XML/HTML mit PrintCSS
Generierung von PDF aus XML/HTML mit PrintCSSGenerierung von PDF aus XML/HTML mit PrintCSS
Generierung von PDF aus XML/HTML mit PrintCSS
 
Creating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsCreating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCs
 
Creating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCsCreating Content Together - Plone Integration with SMASHDOCs
Creating Content Together - Plone Integration with SMASHDOCs
 
The Plone and The Blockchain
The Plone and The BlockchainThe Plone and The Blockchain
The Plone and The Blockchain
 
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCs
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCsContent Gemeinsam Erstellen: Integration Plone mit SMASHDOCs
Content Gemeinsam Erstellen: Integration Plone mit SMASHDOCs
 
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.
PDF Generierung mit XML/HTML und CSS - was die Tools können und was nicht.
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL DatabaseWhy we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL Database
 
XML Director - the technical foundation of onkopedia.com
XML Director - the technical foundation of onkopedia.comXML Director - the technical foundation of onkopedia.com
XML Director - the technical foundation of onkopedia.com
 
PyFilesystem
PyFilesystemPyFilesystem
PyFilesystem
 
Building bridges - Plone Conference 2015 Bucharest
Building bridges   - Plone Conference 2015 BucharestBuilding bridges   - Plone Conference 2015 Bucharest
Building bridges - Plone Conference 2015 Bucharest
 
CSS Paged Media - A review of tools and techniques
CSS Paged Media - A review of tools and techniquesCSS Paged Media - A review of tools and techniques
CSS Paged Media - A review of tools and techniques
 
Why Plone Will Die
Why Plone Will DieWhy Plone Will Die
Why Plone Will Die
 
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...
Onkopedia - Ein medizinisches Leitlinienportal auf dem Weg zu XML-basierten P...
 

Recently uploaded

GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotEdgard Alejos
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 

Recently uploaded (20)

GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform Copilot
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 

PrintCSS workshop XMLPrague 2020

  • 1. PrintCSS A Quick Walkthrough Andreas Jung (ZOPYX) info@zopyx.com www.print-css.rocks XMLPrague 2020 1 https:!//cutt.ly/jrIh5TI
  • 2. AGENDA ‣ What is PrintCSS? ‣ Overview and tools ‣ Examples and usecases ‣ print-css.rocks project ‣ Basic and common "PrintCSS" features ‣ Demo time ‣ The missing parts and the bad parts ‣ Q & A 2
  • 3. ANDREAS JUNG ‣ Master in Computer Science and Electrical Engineering ‣ background in electronic publishing since 1995 ‣ freelancer since 2004 ‣ large scale content management based on Plone CMS ‣ individual Python software development ‣ conversion workflows and publishing solutions 3
  • 4. ANDREAS JUNG ‣Produce & Publish - www.produce-and-publish.com ‣Collaborative content solutions based on Smashdocs - www.creating-content-together.com ‣XML-Director foundation for XML CMS solutions - www.xml-director.info ‣PrintCSS tutorial - www.print-css.rocks My projects: 4
  • 6. WHAT IS "PRINTCSS"? ‣ "PrintCSS" = XML/HTML + CSS →PDF ‣ Browser "Print" is not "PrintCSS" ‣ "PrintCSS" deals with print specific aspects ‣ "paper" layout information ‣ counters and page numbers ‣ page areas ‣ pagination ‣ footnotes ‣ … 6
  • 7. PRINTCSS AKA CSS PAGED MEDIA ‣ Draft: CSS Paged Media Module Level 3 (2018) ‣ Draft: CSS Generated Content for Paged Media Module (2014) ‣ Concepts ‣ Content: XML or HTML ‣ Design and layout: Cascading Stylesheets CSS ‣ Rule-based approach for defining all aspects of automatic typesetting ‣ separation between content and styling ‣ CSS Paged Media vs. XSL-FO ‣ easy approachability in general ‣ less complex than XSL-FO (CSS as foundation is common knowledge) 7
  • 8. "CSS PAGED MEDIA" TOOLS ‣ WeasyPrint ‣ PrinceXML ‣ PDFreactor ‣ Antennahouse ‣ pdfChip ‣ Versatype (ex Vivliostyle) 8
  • 9. TOOLS - PRICING VS FEATURES 9
  • 10. TOOLS - PRICING VS FEATURES Weasy
 print Prince PDFreactor Antenna- house (pdfChip) Personal
 (commercial) free 495 USD 1.250 USD Personal
 (non commercial) free free free Server free 3.800 USD
 (∞ CPU?) 2.950 USD
 (4 CPU) 5.000 USD
 (1st CPU) 5.000 €
 - 25.000 € Server (EDU) free 1.900 USD 2.065 USD 10
  • 12. EXAMPLE: CATALOG PRODUCTION Source: Bösch Preisliste via PDFreactor 12
  • 13. EXAMPLE: LAYOUT-ORIENTED PUBLICATION Source: Konzepte-IS via PDFreactor 13
  • 14. EXAMPLE: INTERNATIONAL STUDIES Source: Stiftung Wirtschaft und Politik (SWP) via Antennahouse14
  • 15. EXAMPLE: DATABASE-DRIVING PUBLICATIONS Source: EUROPEAN PHARMACOPOEIA via PDFreactor15
  • 16. ‣ vendor-neutral information about "PrintCSS" ‣ information about tools ‣ tested tools: ‣ PrinceXML ‣ Antennahouse ‣ PDFreactor ‣ WeasyPrint ‣ tutorial and lessons ‣ "PrintCSS" related resources ‣ www.print-css.rocks 16
  • 22. MULTI-COLUMNS AND FOOTNOTES ‣ ✅ multi-column support ‣ ✅ footnote support ‣ footnotes within the same column ‣ ✅ AH, Prince ‣ 🚫 PDFreactor 22
  • 23. BASELINE GRID ‣Placement of text within a given grid ‣supported by all tools ‣vendor-specific implementation 23
  • 24. FLOATS (1/3) ‣ (automatic) moving of block elements (images, tables, inserts) ‣ within the current page ‣ within the current column set ‣ to the next page ‣ colspan optional ‣ AH: most complete, but complex extension ‣ Prince, PDFreactor: partial support 24
  • 27. IMAGES ‣ Bitmap images: JPEG, PNG, GIF, TIFF ‣ Vector formats: PDF, SVG ‣ Color spaces: RGB, CMYK, ICC profiles ‣ Problems: ‣ auto-placement ‣ automatic (down)-scaling 27
  • 28. PAGINATION ‣ automatic pagination ‣ pagiation hints through CSS ‣ support for orphans and widows div.chapter {
 page-break-after: always;
 } table {
 page-break-inside: avoid;
 } div.chapter {
 page-break-after: never;
 } div.chapter {
 orphans: 2;
 widows: 3;
 } 28
  • 29. FONTS ‣ Support for all common font formats ‣ Opentype ‣ Truetype ‣ Google webfonts ‣ Fonts embedded by default into the PDF 29
  • 30. RTL, VERTICAL RL, ASIAN CONTENT ‣ General support for right to left ‣ General support for vertical RL (JP/CN) ‣ Special fonts usually required with required code points 30
  • 31. Demo time What do you want to see? 31
  • 32. The missing parts. The bad parts. 32
  • 33. THE "STANDARD" (1/2) ‣ the W3C "CSS Paged Media" standard defines the foundation for "PrintCSS" ‣ standards and specifications are years-old, draft status ‣ status of drafts unclear (unmaintained, work-in- progress, discontinued?) ‣ many vendor specific extensions (development usually driven by customer needs) ‣ limited cross-platform compatibility and interoperability 33
  • 34. THE "STANDARD" (2/2) ‣ conflicting implementations ‣ conflicting interpretations of the "standard" ‣ (missing?) test suite(s) ‣ support of modern/new CSS features ‣ in browsers: fast adaptation ‣ in PrintCSS tools: moving (very) slowly 34
  • 35. (CONSISTENT) JAVASCRIPT SUPPORT ‣ ✅ PrinceXML and PDFreactor ‣ 🚫 Antennahouse ‣ support only for selected JavaScript modules ‣ missing rendering API for hooking into the rendering process 35
  • 36. FLEX BLOCK AND GRID SYSTEMS ‣ Flex block: ‣ ✅ PrinceXML and PDFreactor ‣ 🚫 Antennahouse Source: https://css-tricks.com/ 36
  • 37. 🚫 SIDE NOTES Source: CSS Tricks ‣ Antennahouse: own extension ‣ PDFreactor: CSS + JavaScript ‣ PrinceXML: CSS ‣ 🚫 Challenges: ‣ float to inside/outside ‣ side notes in multi-column environments ‣ positioning 37
  • 38. 🚫 IMAGE POSITIONING (1/2) ‣ Problem: ‣ an image does not fit on the remaining page or into the remaining column ‣ avoid blank areas ‣ Solutions: ‣ float image on next page or into next column ‣ scale image down to remaining space in column or on page 38
  • 39. 🚫 IMAGE POSITIONING (2/2) !/* Prince !*/ #globe { width: 100%; float: column-top next; column-span: 2; } !/* Prince !*/ #globe { width: 100%; float: column-top next; } 39
  • 40. 🚫 FIT TEXT INTO A GIVEN BOX ‣ ✅ PDFreactor: Javascript ‣ ✅ Antennahouse: -ah-overflow-condense: font-stretch | font-size | letter-spacing; ‣ 🚫 PrinceXML 40
  • 41. 🚫 ISSUES WITH HYPHENATION ‣ hyphenation quality differs by language and tool ‣ breaking of long words/terms (e.g. URLs) often an issue ‣ no standard for hyphenation exceptions ‣ injecting and maintaining hyphenation hints (e.g. soft-hyphens) is a pain 41
  • 42. 🚫 ISSUES WITH TABLES ‣ tables split over multiple pages ‣ control over repeating headers and footers ‣ custom table captions ("continued….") ‣ controlling page breaks with row spans 42
  • 43. 🚫 MARGIN BOXES/RUNNING ELEMENTS ‣ page margin boxes: ‣ text only, no HTML ‣ one style per margin box ‣ running elements: ‣ content removed from content area ‣ content place in margin box ‣ content duplication often needed ‣ styling of mixed running elements and generated content is a major pain 43
  • 45. 🚫 DEVELOPING WITH PRINTCSS ‣ no real development tools ‣ rendering process is a blackbox process ‣ content + styles in, PDF out but what is happening inside and why? ‣ few tracing options for the mortal PrintCSS developer ‣ usually a lengthy, iterative process ‣ no/little support for introspecting the rendering process ‣ no/little support for influencing the rendering process besides CSS 45
  • 46. THE ECOSYSTEM ‣ CSS Paged Media tools: ‣ few commercial tools ‣ even fewer non-commercial, free tools ‣ limited options ‣ in-depth evaluation needed for advanced projects ‣ at one point you need to decide and pick one tool 46