SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Andreas Jung • info@zopyx.com • print-css.rocks
State of PrintCSS in 2023
MarkupUK 2023, London
Agenda
(this is not a PrintCSS tutorial)
• Brief introduction to PrintCSS and its standards
• The problems with comparing tools
• Free PrintCSS tools
• Commercial CSS tools
• Role of Javascript in PrintCSS
• The pain points with PrintCSS
• Decision criteria
• Q & A
Publishing developer & consultant
since mid-90s
https://print-css.rocks
https://andreas-jung.com
✉ info@zopyx.com
Funder of print-css.rocks project
Independent PrintCSS consulting
- Software developer & software architect
- Requirements engineering
- Python developer & Python expert
- NGOs, EDU
- medical & pharmaceutical
- energy
- research & development quantum mechanics
- CMS Solutions
- Publishing Solutions
- Individual software solutions
About me
Introduction
The PrintCSS process
• Input: HTML (or XML)
• Styling: CSS
• Formatting: a free or commercial PrintCSS renderer
• Output: PDF
Definition of „PrintCSS“
„PrintCSS“ synonym for „W3C CSS Paged Media“
W3C CSS Paged Media Level 3 (2018)
• the official standard for generated paginated content aka
PDF from HTML using cascading stylesheets (CSS)
Related standards:
• CSS Generated Content for Paged Media Module (2014, GCPM)
Comparing tools, metrics and their problems
How to compare tools in a reasonable way?
Problems
• we have many PrintCSS tools
• we have hundreds of CSS properties + PrintCSS specific CSS properties
• we can not test all tools against all CSS properties
(not manually, not automatically)
• W3C standards do not cover everything, leaving room for interpretations
Metrics and approach of print-css.rocks
• testing the core PrintCSS features (W3C Paged Media, GCPM)
• focus on high-level topics (e.g. footnotes, CSS grid, RTL)
How we do in print-css.rocks?
How we do in print-css.rocks?
How we do in print-css.rocks?
Standards, non-standards and extensions
Example: variations on footnotes
…not even talking of
• endnotes 😈
• sidenotes 😈
Standard
no standard
Free PrintCSS renderers
Free PrintCSS renderers
(Feature selection is highly opinionated)
WeasyPrint Vivliostyle PagedJS
Python
Javascript/
Chromium
Javascript/
Chromium
✅ solid core
✅ Flexbox
✅ Hyphenation
✅ simple footnote support
✅ solid core
✅ Javascript support
✅ MathML
✅ simple footnote support
❌ Grid
❌ Javascript
❌ XML
❌ Hyphentation
❌ XML
❌ many unfixed issues and bugs
good community support good community support community support 🤷
👍
actively maintained
👍
actively maintained
👎👎
badly maintained
Commercial PrintCSS renderers
Commercial PrintCSS renderers
(Feature selection is highly opinionated)
Typeset.sh Prince PDFreactor BFO Publisher
Antennahouse
Formatter
PHP Java Java
✅ solid core
✅ Grid & Flexbox
✅ very mature
✅ Javascript
✅ Flexbox
✅ excellent docs/examples
(https://css4.pub/)
✅ XML
✅ very mature
✅ Javascript
✅ Grid & Flexbox
✅ XML
✅ solid core ✅ very mature
✅ most advanced
typography features
✅ most complete
✅ XML
• young project
• has some rough edges
here and there
❌ Grid • young product
• has some rough edges
• not much experience
❌ Grid
❌ Flexbox
❌ Javascript
✅ excellent support ✅ excellent support ✅ excellent support ✅ excellent support
👍
actively maintained
👍👍
actively maintained
👍
actively maintained
👍
actively maintained
👍👍
actively maintained
89 € (annual)
or 499 € (perpetual licence)
3800 USD (4 CPUs) 2.950 € (4 CPUs) n/a 5000 USD (1st CPU)
* check pricing for educational license or „personal“ usage licenses
Role of Javascript?
Why Javascript?
Javascript is the „Franca Lingua“ of the web (besides HTML)
Javascript on the web:
• no modern web solutions without Javascript
• omnipresent
Javascript in Print/PrintCSS
• provide enhanced visualizations (graphs, charts etc) from the web in print
• for content: ideally Javascript visualization that work on the web, should work in PrintCSS
• for internal usage: influencing the rendering process of the PrintCSS renderer
• generating TOC, listings, indices
Situation of Javascript support in renderers
well…
Renderer PagedJS Prince PDFreactor Vivliostyle
Implementation Chromium/native custom JS engine custom JS engine Chromium/native
JS compatibility for
PDF generation
unknown selected JS packages selected JS packages
best compatibility for JS
modules (where they
make sense)
JS for internal usage unknown
• adaptive rendering
• adaptive image scaling
• table of contents
• adaptive rendering
• adaptive image scaling
• table of contents
unknown
The pain points with PrintCSS
The dark side of PrintCSS and its renderers
Problems and pain points
• inconsistent implementations and behavior of renderers
(due to incomplete or inconsistent Paged Media specifications)
• different defaults (page size, borders, page area dimensions etc.)
• easy things often work differently across tools
• complex topics
• floats
• adaptive rendering of images
• handling of long or wide tables
Decision criteria
Is your publishing use case suitable for PrintCSS?
Automatic typesetting
means automatic!!!
No manual interaction!!!
Know your typographic and layout requirements
…an opinionated selection of criteria
• Is your publication text-oriented or layout-oriented?
• Do you need a grid system or flex box?
• Do you need a baseline grid?
• Support for multiple columns needed?
• Footnotes required?
• Floating objects needed?
Do I need Javascript?
• Do you have to interact with external Javascript modules
(charts etc.)?
• Do you need Javascript support inside the renderer or can you
prepare Javascript-based assets in a pre-processing step?
Do I have XML or HTML as input?
• only some renderers speak XML natively
• but all renderers handle HTML
• raw XML often not directly suitable unless transformed
to publishable XML or HTML
• PrintCSS is not a transformation framework
• flat or nested HTML?
• personal preference: nested HTML but YMMV
Do I have special PDF requirements?
• PDF metadata
• PDF variants
• PDF/UA (accessibility)
• PDF/X (print)
• PDF/A (archiving)
• supported by most commercial renderers
• PDF security (encryption, signing)
• supported by most commercial renderers
Other features needed?
• Scientific context? (formulas, MathML, MathJax)
• integration of renderers in workflows:
• all tools run on the command line
• some tools provide a server mode
• some tools provide APIs for integration with PHP, Python etc.
• Produce & Publish server (abstraction of renderers)
Recommendations
Recommendation and hints
• be aware of your special requirements
(regarding more complex features)
• build prototypes and evaluate against different renderers
• use CSS variables (not widely supported)
• consider using CSS preprocessors (e.g. Less, Sass)
for complex workloads
• start with free tools, use commercial tools if needed
Q & A
Thank you for listening
Andreas Jung • info@zopyx.com • print-css.rocks

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

OpenStackユーザ会資料 - Masakari
OpenStackユーザ会資料 - MasakariOpenStackユーザ会資料 - Masakari
OpenStackユーザ会資料 - Masakari
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
 
Fournier Gangrene.pptx
Fournier Gangrene.pptxFournier Gangrene.pptx
Fournier Gangrene.pptx
 
Monitoring Kafka w/ Prometheus
Monitoring Kafka w/ PrometheusMonitoring Kafka w/ Prometheus
Monitoring Kafka w/ Prometheus
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
 
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewOpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
 
Terraform
TerraformTerraform
Terraform
 
Kubeflow Pipelines (with Tekton)
Kubeflow Pipelines (with Tekton)Kubeflow Pipelines (with Tekton)
Kubeflow Pipelines (with Tekton)
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practices
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster Suite
 
Microservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and KubernetesMicroservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and Kubernetes
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
High Performance Computing Pitch Deck
High Performance Computing Pitch DeckHigh Performance Computing Pitch Deck
High Performance Computing Pitch Deck
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and Terraform
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021
 
Infrastructure as "Code" with Pulumi
Infrastructure as "Code" with PulumiInfrastructure as "Code" with Pulumi
Infrastructure as "Code" with Pulumi
 

Semelhante a State of PrintCSS - MarkupUK 2023.pdf

Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
Peter Kaizer
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
Talbott Crowell
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
Frédéric Harper
 

Semelhante a State of PrintCSS - MarkupUK 2023.pdf (20)

Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
 
Web design training , Web Design Training In Kolkata
Web design training , Web Design Training In KolkataWeb design training , Web Design Training In Kolkata
Web design training , Web Design Training In Kolkata
 
Approaches to Responsive Wen Design & Development
Approaches to Responsive Wen Design & DevelopmentApproaches to Responsive Wen Design & Development
Approaches to Responsive Wen Design & Development
 
IWMW 1997: Web tools
IWMW 1997: Web toolsIWMW 1997: Web tools
IWMW 1997: Web tools
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
PrintCSS W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020PrintCSS W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020
 
Javascript Template Engine - Getting Started
Javascript Template Engine - Getting StartedJavascript Template Engine - Getting Started
Javascript Template Engine - Getting Started
 
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
 
Converting and Transforming Technical Graphics
Converting and Transforming Technical GraphicsConverting and Transforming Technical Graphics
Converting and Transforming Technical Graphics
 
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
 
Cool Tools for Technical Writers
Cool Tools for Technical WritersCool Tools for Technical Writers
Cool Tools for Technical Writers
 
Metadata & Interoperability: Free Tools
Metadata & Interoperability: Free ToolsMetadata & Interoperability: Free Tools
Metadata & Interoperability: Free Tools
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
Webinar - Transforming Graphical Data
Webinar - Transforming Graphical DataWebinar - Transforming Graphical Data
Webinar - Transforming Graphical Data
 
Incremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentIncremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend Development
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your Way
 

Mais de Andreas Jung

Mais de 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
 
PrintCSS workshop XMLPrague 2020
PrintCSS workshop XMLPrague 2020PrintCSS workshop XMLPrague 2020
PrintCSS workshop XMLPrague 2020
 
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
 
Integration of Plone with eXist-db
Integration of Plone with eXist-dbIntegration of Plone with eXist-db
Integration of Plone with eXist-db
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

State of PrintCSS - MarkupUK 2023.pdf

  • 1. Andreas Jung • info@zopyx.com • print-css.rocks State of PrintCSS in 2023 MarkupUK 2023, London
  • 2. Agenda (this is not a PrintCSS tutorial) • Brief introduction to PrintCSS and its standards • The problems with comparing tools • Free PrintCSS tools • Commercial CSS tools • Role of Javascript in PrintCSS • The pain points with PrintCSS • Decision criteria • Q & A
  • 3. Publishing developer & consultant since mid-90s https://print-css.rocks https://andreas-jung.com ✉ info@zopyx.com Funder of print-css.rocks project Independent PrintCSS consulting - Software developer & software architect - Requirements engineering - Python developer & Python expert - NGOs, EDU - medical & pharmaceutical - energy - research & development quantum mechanics - CMS Solutions - Publishing Solutions - Individual software solutions About me
  • 5. The PrintCSS process • Input: HTML (or XML) • Styling: CSS • Formatting: a free or commercial PrintCSS renderer • Output: PDF
  • 6. Definition of „PrintCSS“ „PrintCSS“ synonym for „W3C CSS Paged Media“ W3C CSS Paged Media Level 3 (2018) • the official standard for generated paginated content aka PDF from HTML using cascading stylesheets (CSS) Related standards: • CSS Generated Content for Paged Media Module (2014, GCPM)
  • 7. Comparing tools, metrics and their problems How to compare tools in a reasonable way? Problems • we have many PrintCSS tools • we have hundreds of CSS properties + PrintCSS specific CSS properties • we can not test all tools against all CSS properties (not manually, not automatically) • W3C standards do not cover everything, leaving room for interpretations Metrics and approach of print-css.rocks • testing the core PrintCSS features (W3C Paged Media, GCPM) • focus on high-level topics (e.g. footnotes, CSS grid, RTL)
  • 8. How we do in print-css.rocks?
  • 9. How we do in print-css.rocks?
  • 10. How we do in print-css.rocks?
  • 11. Standards, non-standards and extensions Example: variations on footnotes …not even talking of • endnotes 😈 • sidenotes 😈 Standard no standard
  • 13. Free PrintCSS renderers (Feature selection is highly opinionated) WeasyPrint Vivliostyle PagedJS Python Javascript/ Chromium Javascript/ Chromium ✅ solid core ✅ Flexbox ✅ Hyphenation ✅ simple footnote support ✅ solid core ✅ Javascript support ✅ MathML ✅ simple footnote support ❌ Grid ❌ Javascript ❌ XML ❌ Hyphentation ❌ XML ❌ many unfixed issues and bugs good community support good community support community support 🤷 👍 actively maintained 👍 actively maintained 👎👎 badly maintained
  • 15. Commercial PrintCSS renderers (Feature selection is highly opinionated) Typeset.sh Prince PDFreactor BFO Publisher Antennahouse Formatter PHP Java Java ✅ solid core ✅ Grid & Flexbox ✅ very mature ✅ Javascript ✅ Flexbox ✅ excellent docs/examples (https://css4.pub/) ✅ XML ✅ very mature ✅ Javascript ✅ Grid & Flexbox ✅ XML ✅ solid core ✅ very mature ✅ most advanced typography features ✅ most complete ✅ XML • young project • has some rough edges here and there ❌ Grid • young product • has some rough edges • not much experience ❌ Grid ❌ Flexbox ❌ Javascript ✅ excellent support ✅ excellent support ✅ excellent support ✅ excellent support 👍 actively maintained 👍👍 actively maintained 👍 actively maintained 👍 actively maintained 👍👍 actively maintained 89 € (annual) or 499 € (perpetual licence) 3800 USD (4 CPUs) 2.950 € (4 CPUs) n/a 5000 USD (1st CPU) * check pricing for educational license or „personal“ usage licenses
  • 17. Why Javascript? Javascript is the „Franca Lingua“ of the web (besides HTML) Javascript on the web: • no modern web solutions without Javascript • omnipresent Javascript in Print/PrintCSS • provide enhanced visualizations (graphs, charts etc) from the web in print • for content: ideally Javascript visualization that work on the web, should work in PrintCSS • for internal usage: influencing the rendering process of the PrintCSS renderer • generating TOC, listings, indices
  • 18. Situation of Javascript support in renderers well… Renderer PagedJS Prince PDFreactor Vivliostyle Implementation Chromium/native custom JS engine custom JS engine Chromium/native JS compatibility for PDF generation unknown selected JS packages selected JS packages best compatibility for JS modules (where they make sense) JS for internal usage unknown • adaptive rendering • adaptive image scaling • table of contents • adaptive rendering • adaptive image scaling • table of contents unknown
  • 19. The pain points with PrintCSS
  • 20. The dark side of PrintCSS and its renderers Problems and pain points • inconsistent implementations and behavior of renderers (due to incomplete or inconsistent Paged Media specifications) • different defaults (page size, borders, page area dimensions etc.) • easy things often work differently across tools • complex topics • floats • adaptive rendering of images • handling of long or wide tables
  • 22. Is your publishing use case suitable for PrintCSS? Automatic typesetting means automatic!!! No manual interaction!!!
  • 23. Know your typographic and layout requirements …an opinionated selection of criteria • Is your publication text-oriented or layout-oriented? • Do you need a grid system or flex box? • Do you need a baseline grid? • Support for multiple columns needed? • Footnotes required? • Floating objects needed?
  • 24. Do I need Javascript? • Do you have to interact with external Javascript modules (charts etc.)? • Do you need Javascript support inside the renderer or can you prepare Javascript-based assets in a pre-processing step?
  • 25. Do I have XML or HTML as input? • only some renderers speak XML natively • but all renderers handle HTML • raw XML often not directly suitable unless transformed to publishable XML or HTML • PrintCSS is not a transformation framework • flat or nested HTML? • personal preference: nested HTML but YMMV
  • 26. Do I have special PDF requirements? • PDF metadata • PDF variants • PDF/UA (accessibility) • PDF/X (print) • PDF/A (archiving) • supported by most commercial renderers • PDF security (encryption, signing) • supported by most commercial renderers
  • 27. Other features needed? • Scientific context? (formulas, MathML, MathJax) • integration of renderers in workflows: • all tools run on the command line • some tools provide a server mode • some tools provide APIs for integration with PHP, Python etc. • Produce & Publish server (abstraction of renderers)
  • 29. Recommendation and hints • be aware of your special requirements (regarding more complex features) • build prototypes and evaluate against different renderers • use CSS variables (not widely supported) • consider using CSS preprocessors (e.g. Less, Sass) for complex workloads • start with free tools, use commercial tools if needed
  • 30. Q & A
  • 31. Thank you for listening Andreas Jung • info@zopyx.com • print-css.rocks