SlideShare a Scribd company logo
1 of 32
Download to read offline
Publishing with CSS Paged Media

A review of existing tools and techniques
Andreas Jung @MacYET
ZOPYX • www.zopyx.com
XML Prague 2015
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Speaker
‣ 20 years in electronic publishing
‣ Saarbrücker Zeitung, Haufe-Lexware
‣ Freelancer since 2004
‣ Python, Zope, Plone development
‣ content-management and large web apps
‣ "Produce & Publish" publishing platform
‣ using w/ CSS Paged Media in production since 2005
(csstoxslfo + FOP)
‣ "XML is data, not a religion" 😊
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
The case against XSL-FO
‣ XSL-FO Working Group has disbanded
‣ "We have closed the Working Group because not enough people
were taking part." 

Liam R. E. Quin (W3C XML Activity Lead) - November 2013
‣ Too complicated, too verbose
‣ Lack of experienced XSL-FO developers
‣ Publishers are on the move away from XSL-FO
‣ Vendors are on the move towards CSS support
‣ Customers are checking for alternatives
‣ XSL-FO is going to die (slowly)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
What is CSS Paged Media?
‣ CSS Paged Media Module Level 3
‣ W3C Working Draft 14 March 2013 (1st version in 2006)
Converter
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Why HTML and not XML???
‣ PDFreactor and PrinceXML work natively on HTML
‣ XML conversion supported through display property
mytable {
display: table;
}
mycell {
display: table-cell;
}
‣ XML can be converted to HTML (easily, XSLT)
‣ Javascript processing works only on HTML DOM
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Supported publication types
Traditional automatic
typesetting
✓ one/multi-col layouts
✓ images
✓ footnotes
✓ hyphenation
✓ headers and footers
✓ footnotes
✓ cross-references
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Supported publication types
̈ ̈
̈
̈
·
̈
Layout-oriented publications
✓ absolute positioning of boxes
✓ web-to-print applications
✓ brochures
✓ flyers
✓ catalogs
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Tools
‣ CSS Paged Media Tools with a XSL-FO history:
‣ cloudformatter.com (RenderX/XEP under the hood)
‣ Native CSS Paged Media Tools:
‣ Pisa, Weasyprint (free, Python)
‣ WKHTMLTOPDF (free, open-source)
‣ PrinceXML (proprietary, 3800 USD)
‣ PDFreactor (proprietary, 2250 €)
‣ Antennahouse 6.2 CSS (prop, 5000 USD)
better
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
@page rule
@page {
size: a4;
margin: 1cm;
}
@page {
size: 20cm 10cm;
margin: 1cm;
}
@page :left {
margin-left: 2cm
}
@page :right {
margin-right: 2cm
}
div.special {
page: special;
}
@page special {
color: red
}
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Page regions
(www.pdfreactor.com)
@page :left {
@bottom-left {
content: counter(page);
}
}
@page :right {
@bottom-right {
content: counter(page);
}
}
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Multi column layouts
div {
column-count: 3;
column-width: 5cm;
}
(src: PDFreactor documentation)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Images
‣ Raster formats: PNG, GIF, JPG, TIFF, BMP
‣ Vector formats: SVG
‣ Color spaces: RGB(A), CMYK (PDFreactor, AH)
‣ Positioning: relative or absolute
‣ Size: CSS width and height properties
‣ CSS 3 transformations applicable
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Images
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Images
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Problems with images
‣ Floating capabilities (PrinceXML has some options)
‣ Correct sizing and auto-placing of images
‣ Auto-adjustment of image sizes using CSS 

(min-width, max-width, min-height, max-height)
‣ Some relief: rescaling the image through Javascript
based on width/height of the outer container
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Tables
‣ Standard HTML table model with table head, body, foot
‣ Tables can span multiple pages
‣ Table head repeating on successive pages
‣ Extra-wide tables:
table.wide {
page: widetable;
}
@page widetable {
size: a4 landscape;
}
table.wide {
transform: rotate(90deg);
}
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Tables
19
Bei relevanter Niereninsuffizienz muss eine individuelle Risikoabschätzung erfol-
gen und ggf. eine Dosisreduktion des Bisphosphonates durchgeführt werden.
Aktuelle Daten der MRC-Studiengruppe, welche einen Überlebensvorteil für Pati-
enten unter einer Bisphosphonattherapie mit Zoledronat bis zum Krankheitspro-
gress zeigen, haben die Diskussion über die Dauer einer Bisphosphonattherapie
verändert. So weichen einige Empfehlungen jetzt wieder von dem bisherigen
Konsensus einer zweijährigen Bisphosphonatbehandlung ab und empfehlen eine
langfristige Therapie mit Zoledronat bei Patienten, die keine CR erreichen.
Ein Nutzen für den Einsatz des Anti-RANKL Antikörpers Denosumab ist bei Patien-
ten mit Multiplem Myelom nicht belegt.
7. Verlaufskontrolle
2006 wurden durch die International Myeloma Working Group (IMWG) internatio-
nal akzeptierte Kriterien vereinbart, um die Vergleichbarkeit von Studienergebnis-
sen zu ermöglichen [54] . Wichtigste Änderung in Bezug auf die bis dahin im
europäischen Raum benutzten Ansprechkriterien der EBMT ist die Implementie-
rung der Bestimmung freier Leichtketten im Serum mittels FLC Assay, welche
insbesondere die Verlaufskontrolle vieler oligo-sekretorischer und nicht-sekretori-
scher Myelomformen ermöglicht. Weiterhin wurde die near complete response
(nCR) in die very good partial response (VGPR) integriert und die stringent
complete response (sCR) als vorerst höherwertige Remissionsqualität eingeführt.
1 FLC (Free Light Chain) – Quotient: Quotient aus beteiligter und nicht-beteiligter Leichtkette;
2 sCR (stringent Complete Remission) – stringente komplette Remission; 2 CR (Complete Remis-
sion) – komplette Remission; 4 VGPR (Very Good Partial Remission) – sehr gute partielle Remis-
sion; 5 PR (Partial Remission) – partielle Remission; 6 SD (Stable Disease) – stabile Erkrankung;
7 PD (Progressive Disease) – progrediente Erkrankung; 8 weitere Kriterien sind: Neuauftreten oder
Progress ossärer Manifestationen, MM-bedingte Hyperkalzämie;
Kriterien
Status
M Protein
Elektropho-
rese
M Protein
Immunfixa-
tion
Freie Leichtket-
ten (FLC-Quoti-
ent1)
Weichteil-
Manifesta-
tion
Plasmazellen im
Knochenmark
sCR2
(alle Kriterien
sind erfüllt)
nicht nach-
weisbar in
Serum und
Urin
normalisiert nicht nach-
weisbar
≤ 5 %;
keine klonalen Plas-
mazellen nachweis-
bar (Immunhistoche-
mie)
CR3
(alle Krite-
rien sind
erfüllt)
nicht nach-
weisbar in
Serum und
Urin
nicht nach-
weisbar
< 5 %
VGPR4
(alle Kriterien
sind erfüllt)
≥ 90%
Reduktion im
Serum und
< 100 mg/
24h im Urin
oder
nachweis-
bar
20
Kriterien
Status
M Protein
Elektropho-
rese
M Protein
Immunfixa-
tion
Freie Leichtket-
ten (FLC-Quoti-
ent1)
Weichteil-
Manifesta-
tion
Plasmazellen im
Knochenmark
kein M
Protein in
Serum und
Urin nach-
weisbar
PR5 ≥ 50%
Reduktion im
Serum und
≥ 90%
Reduktion im
Urin oder <
200 mg/24h
im Urin
> 50 % Reduk-
tion des Quoti-
enten, falls M-
Protein nicht
bestimmbar
> 50 %
Reduktion
(obligates
Kriterium)
> 50 % Reduktion
der Infiltration, falls
Anteil vor Therapie >
30% und falls M-
Protein und FLC
Quotient nicht
bestimmbar
SD6 weder Kriterien von sCR, CR, VGPR, PR noch PD erfüllt
PD7
(mindestens
ein Kriterium
ist erfüllt,
oder neue
Symptome8)
≥ 25%
Anstieg im
Serum und
absolut ≥ 0,5
g/dl und/oder
≥ 25%
Reduktion im
Urin oder
absolut ≥
200 mg/24h
> 25 % Anstieg
des Quotienten
Neuauftre-
ten oder
Progress
> 25 % Anstieg und
absolut um > 10%
Weitere Definitionen betreffen:
Refraktäres Myelom:
• Fortschreiten der Erkrankung unter Therapie oder
• innerhalb von 60 Tagen nach Therapie.
Minor response (MR) bei rezidivierten, refraktären Myelomerkrankungen
• Reduktion des Serum M-Gradienten > 25%, aber < 49% UND
• Reduktion des Urin M-Gradienten um 50-89% (>200mg/24h)
• Größenreduktion von Weichteilmanifestationen um 24-49%
• keine Zunahme in Anzahl und Größen von Osteolysen.
Übergang in ein aktives Myelom bei bestehendem Smouldering myeloma
• Kriterien der PD nach IMWG oder
• positive CRAB-Kriterien oder
• Entwicklung extramedullärer Weichteilmanifestationen.
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Tables
7.4 Anti-VEGF Therapie (Bevacizumab)
Erstautor
/ Jahr
Studie Patienten Kontrolle
Neue
Therapie
N1 RR2 PFÜ4
(HR3)
ÜLZ5 Anmerkung DOI, PMID6
Miller,
2007
Gray,
2009
E2100 Erstlinie Pac7 Pac +
Bev
722
21,26
vs 36,9
p <
0,001
5,9 vs
11,8
0,6010
p <
0,001
n.s.9
PMID: 18160686
DOI: 10.1200/
JCO.2008.21.6630
Miles,
2010
AVADO Erstlinie Doc
Doc +
Bev11 488
46,4 vs
64,1
p =
0,0003
8,1 vs
10,0
0,67
p =
0,0002
n.s.
DOI: 10.1200/
JCO.2008.21.6457
Valachis,
2010
Erstlinie
+ spätere
Chemo
Chemo-
+ Bev
3163
1,26
p <
0,00001
0,70
p <
0,0001
n.s. Metaanalyse
DOI:10.1007/
s10549-009-0727-0
60
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Counters
<h1>title</h1>
<h2>subtitle</h1>
<h2>another subtitle</h2>
<h1>title 2</h1>
h1 {
counter-increment: c1;
counter-reset: c2;
}
h2 {
counter-increment: c2;
}
h1:before {
content: counter(c1) "."
}
h2:before {
content: counter(c1) "."
counter(c2);
}
1. title
1.1 subtitle
1.2 another subtitle
2. title 2
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Footnotes
.fn {
float: footnote
}
<p>
Footnotes <span class="fn">A footnote is a note placed at
the bottom of a page of a book or manuscript that comments on or
cites a reference for a designated part of the text.</span>
…
</p>
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Footnotes
1 A footnote is a note placed at the bottom of a page of a
book or manuscript that comments on or cites a
reference for a designated part of the text.
2 Often, the most interesting information is found in the
footnotes.
Footnotes1 are essential in printed documents and
Prince knows how to generate them. Most readers will
read the footnotes before they read the text from where
the footnotes are anchored2.
Limitation: no footnotes in multi-column layouts (Antennahouse?)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Cross references
<a class="pageref" href="#figure">see the figure</a>
a.pageref::after {
content: " on page " target-counter(attr(href), page);
}
"…see the figure on page 22"
<div name="figure">This is a figure</div>
<a class="pageref" href="#figure">see the figure</a>
a.pageref: {
content: "See '" target-content(attr(href)) "'";
}
"See 'this is a figure' "
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Pagination & Page breaks
<h1>title</h1>
<p>…</p>
h1 {
page-break-before: always;
}
<h1>title</h1>
<div class=„sub“>…</p>
<div class=„content“>…</div>
h1 { page-break-before: always;}
div.sub { page-break-after: always; }
<ul>
…
</ul>
ul {
page-break-inside: avoid;
}
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Hyphenation, Orphans, Widows
<p>
….long paragraph…
</p>
p {
orphans: 4;
widows: 3;
}
<body lang=„de“>
<div lang=„en“>
EN Text
</div>
<p>DE text</ep>
</body>
body {
hyphens: auto;
hyphenate-before: 4;
hyphenate-after: 4;
}
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
The Power of Javascript
‣ HTML represented internally as DOM 

(Document Object Model)
‣ Javascript code interacts with the DOM as with browsers
‣ Use cases:
‣ modification of content (table of content generation)
‣ index generation
‣ adaptive image scaling
‣ PrinceXML/PDFreactor support standard 

Javascript modules like jQuery
‣ possibly a lot of potential (documentation problem)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
CSS Page Floats
‣ Float = content that can be moved ouf of the current text
flow into a different place
‣ Different implementations
‣ AH: http://www.antennahouse.com/CSSInfo/float-
extension.html
‣ PrinceXML: http://www.princexml.com/doc/properties/float/
‣ W3C: http://dev.w3.org/csswg/css-page-floats/
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
CSS Page Floats (W3C Draft)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
CSS Page Floats (W3C Draft)
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Summary of tools
PrinceXML 9 PDFreactor 7 AH 6.2/CSS Extensions
Price 3800 USD 2250 € 5000 USD
Licence
proprietary

(4 CPU)
proprietary

(4 CPU)
proprietary

(1 CPU)
Documentation
poor/inconsistent/
incomplete
good average/incomplete
Support good good limited/no experience
Javascript yes/limited yes/good support no
Tagged PDF no yes yes
PDF Metadata yes yes yes
Signed PDF no yes yes
Encrypted PDF yes yes yes
www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX
Limitations of CSS Paged Media
‣ Automatic typesetting means automatic
‣ Limited influence on the typesetting process
‣ Manual interaction through specific CSS hints/rules
‣ (sometimes time consuming) iterative interactive process
(except using PDFreactor/Nimbudocs Editor)
‣ Typical usecases
‣ Technical documentation, manuals
‣ Catalogs
‣ Brochures
‣ (Mass) Publications with similar layouts
Questions?
‣ www.andreas-jung.com
‣ www.zopyx.com
‣ www.produce-and-publish.com
‣ www.xml-director.info

More Related Content

What's hot

Node.js File system & Streams
Node.js File system & StreamsNode.js File system & Streams
Node.js File system & StreamsEyal Vardi
 
13 Java Script - Validação de formulário
13 Java Script  - Validação de formulário13 Java Script  - Validação de formulário
13 Java Script - Validação de formulárioCentro Paula Souza
 
A History of PHP
A History of PHPA History of PHP
A History of PHPXinchen Hui
 
Your Path to HCL Nomad Web goes from Domino through SafeLinx
Your Path to HCL Nomad Web goes from Domino through SafeLinxYour Path to HCL Nomad Web goes from Domino through SafeLinx
Your Path to HCL Nomad Web goes from Domino through SafeLinxpanagenda
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Michiel Rook
 
PHP Basic and Fundamental Questions and Answers with Detail Explanation
PHP Basic and Fundamental Questions and Answers with Detail ExplanationPHP Basic and Fundamental Questions and Answers with Detail Explanation
PHP Basic and Fundamental Questions and Answers with Detail ExplanationAbdul Rahman Sherzad
 
Monitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com ZabbixMonitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com ZabbixAndré Déo
 
Programação Web com PHP 7.x
Programação Web com PHP 7.xProgramação Web com PHP 7.x
Programação Web com PHP 7.xNorton Guimarães
 
Web application development with laravel php framework version 4
Web application development with laravel php framework version 4Web application development with laravel php framework version 4
Web application development with laravel php framework version 4Untung D Saptoto
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntaxDhani Ahmad
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debateRestlet
 
Tweaking the interactive grid
Tweaking the interactive gridTweaking the interactive grid
Tweaking the interactive gridRoel Hartman
 
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月Masahiro Nagano
 

What's hot (20)

Node.js File system & Streams
Node.js File system & StreamsNode.js File system & Streams
Node.js File system & Streams
 
13 Java Script - Validação de formulário
13 Java Script  - Validação de formulário13 Java Script  - Validação de formulário
13 Java Script - Validação de formulário
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
 
Your Path to HCL Nomad Web goes from Domino through SafeLinx
Your Path to HCL Nomad Web goes from Domino through SafeLinxYour Path to HCL Nomad Web goes from Domino through SafeLinx
Your Path to HCL Nomad Web goes from Domino through SafeLinx
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
PHP Basic and Fundamental Questions and Answers with Detail Explanation
PHP Basic and Fundamental Questions and Answers with Detail ExplanationPHP Basic and Fundamental Questions and Answers with Detail Explanation
PHP Basic and Fundamental Questions and Answers with Detail Explanation
 
Php Basico
Php BasicoPhp Basico
Php Basico
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
Monitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com ZabbixMonitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com Zabbix
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Programação Web com PHP 7.x
Programação Web com PHP 7.xProgramação Web com PHP 7.x
Programação Web com PHP 7.x
 
Les Servlets et JSP
Les Servlets et JSPLes Servlets et JSP
Les Servlets et JSP
 
Web application development with laravel php framework version 4
Web application development with laravel php framework version 4Web application development with laravel php framework version 4
Web application development with laravel php framework version 4
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debate
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
 
Tweaking the interactive grid
Tweaking the interactive gridTweaking the interactive grid
Tweaking the interactive grid
 
Vue.js
Vue.jsVue.js
Vue.js
 
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
 
Php tutorial
Php  tutorialPhp  tutorial
Php tutorial
 

More from Andreas Jung

State of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfState of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfAndreas 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
 
PrintCSS W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020PrintCSS W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020Andreas Jung
 
PrintCSS workshop XMLPrague 2020
PrintCSS workshop XMLPrague 2020PrintCSS workshop XMLPrague 2020
PrintCSS workshop XMLPrague 2020Andreas 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
 

More from Andreas Jung (20)

State of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdfState of PrintCSS - MarkupUK 2023.pdf
State of PrintCSS - MarkupUK 2023.pdf
 
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 W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020PrintCSS W3C workshop at XMLPrague 2020
PrintCSS W3C workshop at XMLPrague 2020
 
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

  • 1. Publishing with CSS Paged Media
 A review of existing tools and techniques Andreas Jung @MacYET ZOPYX • www.zopyx.com XML Prague 2015
  • 2. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Speaker ‣ 20 years in electronic publishing ‣ Saarbrücker Zeitung, Haufe-Lexware ‣ Freelancer since 2004 ‣ Python, Zope, Plone development ‣ content-management and large web apps ‣ "Produce & Publish" publishing platform ‣ using w/ CSS Paged Media in production since 2005 (csstoxslfo + FOP) ‣ "XML is data, not a religion" 😊
  • 3.
  • 4. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX The case against XSL-FO ‣ XSL-FO Working Group has disbanded ‣ "We have closed the Working Group because not enough people were taking part." 
 Liam R. E. Quin (W3C XML Activity Lead) - November 2013 ‣ Too complicated, too verbose ‣ Lack of experienced XSL-FO developers ‣ Publishers are on the move away from XSL-FO ‣ Vendors are on the move towards CSS support ‣ Customers are checking for alternatives ‣ XSL-FO is going to die (slowly)
  • 5. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX What is CSS Paged Media? ‣ CSS Paged Media Module Level 3 ‣ W3C Working Draft 14 March 2013 (1st version in 2006) Converter
  • 6. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Why HTML and not XML??? ‣ PDFreactor and PrinceXML work natively on HTML ‣ XML conversion supported through display property mytable { display: table; } mycell { display: table-cell; } ‣ XML can be converted to HTML (easily, XSLT) ‣ Javascript processing works only on HTML DOM
  • 7. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Supported publication types Traditional automatic typesetting ✓ one/multi-col layouts ✓ images ✓ footnotes ✓ hyphenation ✓ headers and footers ✓ footnotes ✓ cross-references
  • 8. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Supported publication types ̈ ̈ ̈ ̈ · ̈ Layout-oriented publications ✓ absolute positioning of boxes ✓ web-to-print applications ✓ brochures ✓ flyers ✓ catalogs
  • 9. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Tools ‣ CSS Paged Media Tools with a XSL-FO history: ‣ cloudformatter.com (RenderX/XEP under the hood) ‣ Native CSS Paged Media Tools: ‣ Pisa, Weasyprint (free, Python) ‣ WKHTMLTOPDF (free, open-source) ‣ PrinceXML (proprietary, 3800 USD) ‣ PDFreactor (proprietary, 2250 €) ‣ Antennahouse 6.2 CSS (prop, 5000 USD) better
  • 10. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX @page rule @page { size: a4; margin: 1cm; } @page { size: 20cm 10cm; margin: 1cm; } @page :left { margin-left: 2cm } @page :right { margin-right: 2cm } div.special { page: special; } @page special { color: red }
  • 11. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Page regions (www.pdfreactor.com) @page :left { @bottom-left { content: counter(page); } } @page :right { @bottom-right { content: counter(page); } }
  • 12. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Multi column layouts div { column-count: 3; column-width: 5cm; } (src: PDFreactor documentation)
  • 13. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Images ‣ Raster formats: PNG, GIF, JPG, TIFF, BMP ‣ Vector formats: SVG ‣ Color spaces: RGB(A), CMYK (PDFreactor, AH) ‣ Positioning: relative or absolute ‣ Size: CSS width and height properties ‣ CSS 3 transformations applicable
  • 14. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Images
  • 15. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Images
  • 16. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Problems with images ‣ Floating capabilities (PrinceXML has some options) ‣ Correct sizing and auto-placing of images ‣ Auto-adjustment of image sizes using CSS 
 (min-width, max-width, min-height, max-height) ‣ Some relief: rescaling the image through Javascript based on width/height of the outer container
  • 17. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Tables ‣ Standard HTML table model with table head, body, foot ‣ Tables can span multiple pages ‣ Table head repeating on successive pages ‣ Extra-wide tables: table.wide { page: widetable; } @page widetable { size: a4 landscape; } table.wide { transform: rotate(90deg); }
  • 18. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Tables 19 Bei relevanter Niereninsuffizienz muss eine individuelle Risikoabschätzung erfol- gen und ggf. eine Dosisreduktion des Bisphosphonates durchgeführt werden. Aktuelle Daten der MRC-Studiengruppe, welche einen Überlebensvorteil für Pati- enten unter einer Bisphosphonattherapie mit Zoledronat bis zum Krankheitspro- gress zeigen, haben die Diskussion über die Dauer einer Bisphosphonattherapie verändert. So weichen einige Empfehlungen jetzt wieder von dem bisherigen Konsensus einer zweijährigen Bisphosphonatbehandlung ab und empfehlen eine langfristige Therapie mit Zoledronat bei Patienten, die keine CR erreichen. Ein Nutzen für den Einsatz des Anti-RANKL Antikörpers Denosumab ist bei Patien- ten mit Multiplem Myelom nicht belegt. 7. Verlaufskontrolle 2006 wurden durch die International Myeloma Working Group (IMWG) internatio- nal akzeptierte Kriterien vereinbart, um die Vergleichbarkeit von Studienergebnis- sen zu ermöglichen [54] . Wichtigste Änderung in Bezug auf die bis dahin im europäischen Raum benutzten Ansprechkriterien der EBMT ist die Implementie- rung der Bestimmung freier Leichtketten im Serum mittels FLC Assay, welche insbesondere die Verlaufskontrolle vieler oligo-sekretorischer und nicht-sekretori- scher Myelomformen ermöglicht. Weiterhin wurde die near complete response (nCR) in die very good partial response (VGPR) integriert und die stringent complete response (sCR) als vorerst höherwertige Remissionsqualität eingeführt. 1 FLC (Free Light Chain) – Quotient: Quotient aus beteiligter und nicht-beteiligter Leichtkette; 2 sCR (stringent Complete Remission) – stringente komplette Remission; 2 CR (Complete Remis- sion) – komplette Remission; 4 VGPR (Very Good Partial Remission) – sehr gute partielle Remis- sion; 5 PR (Partial Remission) – partielle Remission; 6 SD (Stable Disease) – stabile Erkrankung; 7 PD (Progressive Disease) – progrediente Erkrankung; 8 weitere Kriterien sind: Neuauftreten oder Progress ossärer Manifestationen, MM-bedingte Hyperkalzämie; Kriterien Status M Protein Elektropho- rese M Protein Immunfixa- tion Freie Leichtket- ten (FLC-Quoti- ent1) Weichteil- Manifesta- tion Plasmazellen im Knochenmark sCR2 (alle Kriterien sind erfüllt) nicht nach- weisbar in Serum und Urin normalisiert nicht nach- weisbar ≤ 5 %; keine klonalen Plas- mazellen nachweis- bar (Immunhistoche- mie) CR3 (alle Krite- rien sind erfüllt) nicht nach- weisbar in Serum und Urin nicht nach- weisbar < 5 % VGPR4 (alle Kriterien sind erfüllt) ≥ 90% Reduktion im Serum und < 100 mg/ 24h im Urin oder nachweis- bar 20 Kriterien Status M Protein Elektropho- rese M Protein Immunfixa- tion Freie Leichtket- ten (FLC-Quoti- ent1) Weichteil- Manifesta- tion Plasmazellen im Knochenmark kein M Protein in Serum und Urin nach- weisbar PR5 ≥ 50% Reduktion im Serum und ≥ 90% Reduktion im Urin oder < 200 mg/24h im Urin > 50 % Reduk- tion des Quoti- enten, falls M- Protein nicht bestimmbar > 50 % Reduktion (obligates Kriterium) > 50 % Reduktion der Infiltration, falls Anteil vor Therapie > 30% und falls M- Protein und FLC Quotient nicht bestimmbar SD6 weder Kriterien von sCR, CR, VGPR, PR noch PD erfüllt PD7 (mindestens ein Kriterium ist erfüllt, oder neue Symptome8) ≥ 25% Anstieg im Serum und absolut ≥ 0,5 g/dl und/oder ≥ 25% Reduktion im Urin oder absolut ≥ 200 mg/24h > 25 % Anstieg des Quotienten Neuauftre- ten oder Progress > 25 % Anstieg und absolut um > 10% Weitere Definitionen betreffen: Refraktäres Myelom: • Fortschreiten der Erkrankung unter Therapie oder • innerhalb von 60 Tagen nach Therapie. Minor response (MR) bei rezidivierten, refraktären Myelomerkrankungen • Reduktion des Serum M-Gradienten > 25%, aber < 49% UND • Reduktion des Urin M-Gradienten um 50-89% (>200mg/24h) • Größenreduktion von Weichteilmanifestationen um 24-49% • keine Zunahme in Anzahl und Größen von Osteolysen. Übergang in ein aktives Myelom bei bestehendem Smouldering myeloma • Kriterien der PD nach IMWG oder • positive CRAB-Kriterien oder • Entwicklung extramedullärer Weichteilmanifestationen.
  • 19. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Tables 7.4 Anti-VEGF Therapie (Bevacizumab) Erstautor / Jahr Studie Patienten Kontrolle Neue Therapie N1 RR2 PFÜ4 (HR3) ÜLZ5 Anmerkung DOI, PMID6 Miller, 2007 Gray, 2009 E2100 Erstlinie Pac7 Pac + Bev 722 21,26 vs 36,9 p < 0,001 5,9 vs 11,8 0,6010 p < 0,001 n.s.9 PMID: 18160686 DOI: 10.1200/ JCO.2008.21.6630 Miles, 2010 AVADO Erstlinie Doc Doc + Bev11 488 46,4 vs 64,1 p = 0,0003 8,1 vs 10,0 0,67 p = 0,0002 n.s. DOI: 10.1200/ JCO.2008.21.6457 Valachis, 2010 Erstlinie + spätere Chemo Chemo- + Bev 3163 1,26 p < 0,00001 0,70 p < 0,0001 n.s. Metaanalyse DOI:10.1007/ s10549-009-0727-0 60
  • 20. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Counters <h1>title</h1> <h2>subtitle</h1> <h2>another subtitle</h2> <h1>title 2</h1> h1 { counter-increment: c1; counter-reset: c2; } h2 { counter-increment: c2; } h1:before { content: counter(c1) "." } h2:before { content: counter(c1) "." counter(c2); } 1. title 1.1 subtitle 1.2 another subtitle 2. title 2
  • 21. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Footnotes .fn { float: footnote } <p> Footnotes <span class="fn">A footnote is a note placed at the bottom of a page of a book or manuscript that comments on or cites a reference for a designated part of the text.</span> … </p>
  • 22. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Footnotes 1 A footnote is a note placed at the bottom of a page of a book or manuscript that comments on or cites a reference for a designated part of the text. 2 Often, the most interesting information is found in the footnotes. Footnotes1 are essential in printed documents and Prince knows how to generate them. Most readers will read the footnotes before they read the text from where the footnotes are anchored2. Limitation: no footnotes in multi-column layouts (Antennahouse?)
  • 23. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Cross references <a class="pageref" href="#figure">see the figure</a> a.pageref::after { content: " on page " target-counter(attr(href), page); } "…see the figure on page 22" <div name="figure">This is a figure</div> <a class="pageref" href="#figure">see the figure</a> a.pageref: { content: "See '" target-content(attr(href)) "'"; } "See 'this is a figure' "
  • 24. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Pagination & Page breaks <h1>title</h1> <p>…</p> h1 { page-break-before: always; } <h1>title</h1> <div class=„sub“>…</p> <div class=„content“>…</div> h1 { page-break-before: always;} div.sub { page-break-after: always; } <ul> … </ul> ul { page-break-inside: avoid; }
  • 25. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Hyphenation, Orphans, Widows <p> ….long paragraph… </p> p { orphans: 4; widows: 3; } <body lang=„de“> <div lang=„en“> EN Text </div> <p>DE text</ep> </body> body { hyphens: auto; hyphenate-before: 4; hyphenate-after: 4; }
  • 26. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX The Power of Javascript ‣ HTML represented internally as DOM 
 (Document Object Model) ‣ Javascript code interacts with the DOM as with browsers ‣ Use cases: ‣ modification of content (table of content generation) ‣ index generation ‣ adaptive image scaling ‣ PrinceXML/PDFreactor support standard 
 Javascript modules like jQuery ‣ possibly a lot of potential (documentation problem)
  • 27. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX CSS Page Floats ‣ Float = content that can be moved ouf of the current text flow into a different place ‣ Different implementations ‣ AH: http://www.antennahouse.com/CSSInfo/float- extension.html ‣ PrinceXML: http://www.princexml.com/doc/properties/float/ ‣ W3C: http://dev.w3.org/csswg/css-page-floats/
  • 28. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX CSS Page Floats (W3C Draft)
  • 29. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX CSS Page Floats (W3C Draft)
  • 30. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Summary of tools PrinceXML 9 PDFreactor 7 AH 6.2/CSS Extensions Price 3800 USD 2250 € 5000 USD Licence proprietary
 (4 CPU) proprietary
 (4 CPU) proprietary
 (1 CPU) Documentation poor/inconsistent/ incomplete good average/incomplete Support good good limited/no experience Javascript yes/limited yes/good support no Tagged PDF no yes yes PDF Metadata yes yes yes Signed PDF no yes yes Encrypted PDF yes yes yes
  • 31. www.produce-and-publish.com Professional XML Publishing (C) 2015 ZOPYX Limitations of CSS Paged Media ‣ Automatic typesetting means automatic ‣ Limited influence on the typesetting process ‣ Manual interaction through specific CSS hints/rules ‣ (sometimes time consuming) iterative interactive process (except using PDFreactor/Nimbudocs Editor) ‣ Typical usecases ‣ Technical documentation, manuals ‣ Catalogs ‣ Brochures ‣ (Mass) Publications with similar layouts
  • 32. Questions? ‣ www.andreas-jung.com ‣ www.zopyx.com ‣ www.produce-and-publish.com ‣ www.xml-director.info