ETDA Conference - HTML to PDF conversion with pdfHTML

iText Group nv
iText Group nviText Group nv
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
ETDA, INBATEK & iText Conference
Bangkok, July 27, 2017
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Three major ways to create PDF
From scratch using iText objects:
Paragraph, Text, Table, Cell, List,…
Advantage: everything is programmable, hence configurable just the way you want it,
Disadvantage: you need to program everything; small changes need programming.
Using an existing template:
AcroForm technology: fast, easy, but not dynamic (all fields have fixed positions),
XFA technology: dynamic, filling is easy, but form creation is complex, deprecated in PDF 2.0!
By converting HTML + CSS to PDF:
Everyone knows HTML! Everyone knows CSS!
Why would you create a template in another (proprietary?) format?
Create content in HTML, convert to PDF with pdfHTML.
HTML to PDF conversion with pdfHTML2
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
CSS examples
 No CSS,
 Inline CSS,
 Header CSS,
 External CSS.
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
No CSS: HTML + pdfHTML code
HTML to PDF conversion with pdfHTML4
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
No CSS: result
HTML to PDF conversion with pdfHTML5
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Inline CSS: HTML + pdfHTML code
HTML to PDF conversion with pdfHTML6
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Inline CSS: result
HTML to PDF conversion with pdfHTML7
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Header CSS: HTML + pdfHTML code
HTML to PDF conversion with pdfHTML8
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Header CSS: result
HTML to PDF conversion with pdfHTML9
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
External CSS: HTML + pdfHTML code
HTML to PDF conversion with pdfHTML10
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
External CSS: result
HTML to PDF conversion with pdfHTML11
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Adding a background
HTML to PDF conversion with pdfHTML12
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Background
HTML to PDF conversion with pdfHTML13
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Use in the context of pdfHTML
Other convertToPdf() method: FileInputStream and PdfDocument
Why do we need ConverterProperties?
HTML to PDF conversion with pdfHTML14
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Use case: invoices
For every customer you need:
 Raw data that can be converted to simple HTML
 A customer-provided CSS to apply styles
 A customer-provided PDF as company stationery
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
ZUGFeRD examples
HTML to PDF conversion with pdfHTML16
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Responsiveness: HTML vs PDF
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
HTML and different devices
When creating an HTML + CSS file, you don’t always know how it will be viewed:
HTML to PDF conversion with pdfHTML18
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
HTML and different devices
The content can be rendered differently based on the device:
Header, main, left and right pane can be reorganized based on available space
Navigation can be different on different devices
Orientation can change (e.g. turn tablet from portrait to landscape)
You can change the rendering based on Media Queries
Change font, widths, image size, positions,…
 Desktop screens: horizontal placement, smaller font-size,…
 Mobile screen: larger font size, vertical flow,…
 Print: hide interactive and animated features, use less color,…
HTML to PDF conversion with pdfHTML19
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Example HTML
HTML to PDF conversion with pdfHTML20
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Example HTML
HTML to PDF conversion with pdfHTML21
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Media Queries in CSS
HTML to PDF conversion with pdfHTML22
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
The problem with PDF on devices
HTML to PDF conversion with pdfHTML23
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Convert to different PDFs
HTML to PDF conversion with pdfHTML24
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Defining different page sizes
HTML to PDF conversion with pdfHTML25
Introducing:
Tagging
Page sizes
Media Device Description
Create form
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Create your own tags
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Tags student and date don’t exist
HTML to PDF conversion with pdfHTML27
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Extend the tag factory
HTML to PDF conversion with pdfHTML28
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Custom tags: custom functionality
HTML to PDF conversion with pdfHTML29
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
CSS applier needed
More elaborate example: QR Code
QRCodeTagCssApplierFactory extends DefaultCssApplierFactory
QRCodeTagWorkerFactory extends DefaultTagWorkerFactory
QRCodeTagWorker implements ITagWorker
HTML to PDF conversion with pdfHTML30
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
HTML + CSS => PDF
HTML to PDF conversion with pdfHTML31
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
iText DITO
Under development
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Design Interactive Templates Online
33 HTML to PDF conversion with pdfHTML
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Design Interactive Templates Online
34 HTML to PDF conversion with pdfHTML
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
pdfHTML
Tyrion Server
Data
HTML / CSSTemplate PDF
Tyrion
Designer
SQL
JSON
XML
...
Web application
WYSIWYG
Subset HTML
Subset Bootstrap
Data connections
PDF
PDF/A
PDF/U
A
...
Tyrion SDK
Interactive
form
Web form
via web
browser
Request
and submit
data
Front end
Back end
HTML to PDF conversion with pdfHTML35
© 2015, iText Group NV, iText Software Corp., iText Software BVBA
pdfHTML
Tyrion Server
Data
HTML / CSSTemplate PDF
Tyrion
Designer
SQL
JSON
XML
...
Web application
WYSIWYG
Subset HTML
Subset Bootstrap
Data connections
PDF
PDF/A
PDF/U
A
...
Tyrion SDK
Interactive
form
Web form
via web
browser
Request
and submit
data
Front end
Back end
<Name>
<Address>
<Invoice items table
(4 cols, headers, ...)>
<Total>
<Name>
<Address>
item qty price tot
<Item> <Qty> <Price> <Tot>
<Item> <Qty> <Price> <Tot>
<Total>.
Raf Hens
Kerkstraat 108
9050 Gentbrugge
item qty price tot
Item A 4 100 400
Item B 1 10 10
Item C 17 45 765
Item D 2 50 100
Item E 1 70 70
Item F 4 250 1000
Item G 5 100 500
Item H 12 3 36
Item I 1 100 100
Item J 1 35 35
Item K 1 250 250
3266.
Raf Hens
Kerkstraat 108
9050 Gentbrugge
item qty price tot
Item A 4 100 400
Item B 1 10 10
Item C 17 45 765
Item D 2 50 100
Item E 1 70 70
Item F 4 250 1000
Item G 5 100 500
p 1/2
item qty price tot
Item H 12 3 36
Item I 1 100 100
Item J 1 35 35
Item K 1 250 250
3266.
p 2/2
HTML to PDF conversion with pdfHTML36
© 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA
Thank you!
1 of 37

Recommended

The effects of the GDPR by
The effects of the GDPRThe effects of the GDPR
The effects of the GDPRiText Group nv
1.2K views35 slides
Build your own_photobooth by
Build your own_photoboothBuild your own_photobooth
Build your own_photoboothiText Group nv
468 views14 slides
ETDA Conference - Digital signatures: how it's done in PDF by
ETDA Conference - Digital signatures: how it's done in PDFETDA Conference - Digital signatures: how it's done in PDF
ETDA Conference - Digital signatures: how it's done in PDFiText Group nv
1K views69 slides
FIT Seminar Singapore presentation by
FIT Seminar Singapore presentationFIT Seminar Singapore presentation
FIT Seminar Singapore presentationiText Group nv
814 views20 slides
Tech Startup Day 2015: 4 failures and 1 hit by
Tech Startup Day 2015: 4 failures and 1 hitTech Startup Day 2015: 4 failures and 1 hit
Tech Startup Day 2015: 4 failures and 1 hitiText Group nv
453 views15 slides
Intellectual property and licensing by
Intellectual property and licensingIntellectual property and licensing
Intellectual property and licensingiText Group nv
1K views44 slides

More Related Content

More from iText Group nv

PDF made easy with iText 7 by
PDF made easy with iText 7PDF made easy with iText 7
PDF made easy with iText 7iText Group nv
5.4K views38 slides
Start-ups: the tortoise and the hare by
Start-ups: the tortoise and the hareStart-ups: the tortoise and the hare
Start-ups: the tortoise and the hareiText Group nv
582 views32 slides
IANAL: what developers should know about IP and Legal by
IANAL: what developers should know about IP and LegalIANAL: what developers should know about IP and Legal
IANAL: what developers should know about IP and LegaliText Group nv
3.5K views72 slides
Digital Signatures in the Cloud: A B2C Case Study by
Digital Signatures in the Cloud: A B2C Case StudyDigital Signatures in the Cloud: A B2C Case Study
Digital Signatures in the Cloud: A B2C Case StudyiText Group nv
3.8K views33 slides
Digital Signatures: how it's done in PDF by
Digital Signatures: how it's done in PDFDigital Signatures: how it's done in PDF
Digital Signatures: how it's done in PDFiText Group nv
37.9K views46 slides
ZUGFeRD: an overview by
ZUGFeRD: an overviewZUGFeRD: an overview
ZUGFeRD: an overviewiText Group nv
34.7K views25 slides

More from iText Group nv(17)

PDF made easy with iText 7 by iText Group nv
PDF made easy with iText 7PDF made easy with iText 7
PDF made easy with iText 7
iText Group nv5.4K views
Start-ups: the tortoise and the hare by iText Group nv
Start-ups: the tortoise and the hareStart-ups: the tortoise and the hare
Start-ups: the tortoise and the hare
iText Group nv582 views
IANAL: what developers should know about IP and Legal by iText Group nv
IANAL: what developers should know about IP and LegalIANAL: what developers should know about IP and Legal
IANAL: what developers should know about IP and Legal
iText Group nv3.5K views
Digital Signatures in the Cloud: A B2C Case Study by iText Group nv
Digital Signatures in the Cloud: A B2C Case StudyDigital Signatures in the Cloud: A B2C Case Study
Digital Signatures in the Cloud: A B2C Case Study
iText Group nv3.8K views
Digital Signatures: how it's done in PDF by iText Group nv
Digital Signatures: how it's done in PDFDigital Signatures: how it's done in PDF
Digital Signatures: how it's done in PDF
iText Group nv37.9K views
PDF is dead. Long live PDF... with Java! by iText Group nv
PDF is dead. Long live PDF... with Java!PDF is dead. Long live PDF... with Java!
PDF is dead. Long live PDF... with Java!
iText Group nv2.3K views
Digital Signatures: how it's done in PDF by iText Group nv
Digital Signatures: how it's done in PDFDigital Signatures: how it's done in PDF
Digital Signatures: how it's done in PDF
iText Group nv6.1K views
iText Summit 2014: Talk: iText throughout the document life cycle by iText Group nv
iText Summit 2014: Talk: iText throughout the document life cycleiText Summit 2014: Talk: iText throughout the document life cycle
iText Summit 2014: Talk: iText throughout the document life cycle
iText Group nv829 views
iText Summit 2014: Keynote talk by iText Group nv
iText Summit 2014: Keynote talkiText Summit 2014: Keynote talk
iText Summit 2014: Keynote talk
iText Group nv1.4K views
iText Summit 2014: Talk: eGriffie and JustX, introducing digital documents at... by iText Group nv
iText Summit 2014: Talk: eGriffie and JustX, introducing digital documents at...iText Summit 2014: Talk: eGriffie and JustX, introducing digital documents at...
iText Summit 2014: Talk: eGriffie and JustX, introducing digital documents at...
iText Group nv818 views
The XML Forms Architecture by iText Group nv
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms Architecture
iText Group nv1.9K views
Damn, the new generation kids are getting iPads in Highschool! by iText Group nv
Damn, the new generation kids are getting iPads in Highschool!Damn, the new generation kids are getting iPads in Highschool!
Damn, the new generation kids are getting iPads in Highschool!
iText Group nv938 views
PAdES signatures in iText and the road ahead by iText Group nv
PAdES signatures in iText and the road aheadPAdES signatures in iText and the road ahead
PAdES signatures in iText and the road ahead
iText Group nv5.3K views
Best practices in Certifying and Signing PDFs by iText Group nv
Best practices in Certifying and Signing PDFsBest practices in Certifying and Signing PDFs
Best practices in Certifying and Signing PDFs
iText Group nv1.4K views
Choosing the iText Solution that is right for you: Community or Commercial ed... by iText Group nv
Choosing the iText Solution that is right for you: Community or Commercial ed...Choosing the iText Solution that is right for you: Community or Commercial ed...
Choosing the iText Solution that is right for you: Community or Commercial ed...
iText Group nv944 views
The importance of standards by iText Group nv
The importance of standardsThe importance of standards
The importance of standards
iText Group nv1.2K views

Recently uploaded

2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlueShapeBlue
75 views23 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
154 views19 slides
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TShapeBlue
81 views34 slides
"Surviving highload with Node.js", Andrii Shumada by
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
49 views29 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
49 views73 slides
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITShapeBlue
138 views8 slides

Recently uploaded(20)

2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue75 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue154 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue81 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue138 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue114 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue52 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue191 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue69 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue128 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE67 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue172 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue48 views

ETDA Conference - HTML to PDF conversion with pdfHTML

  • 1. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA ETDA, INBATEK & iText Conference Bangkok, July 27, 2017
  • 2. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Three major ways to create PDF From scratch using iText objects: Paragraph, Text, Table, Cell, List,… Advantage: everything is programmable, hence configurable just the way you want it, Disadvantage: you need to program everything; small changes need programming. Using an existing template: AcroForm technology: fast, easy, but not dynamic (all fields have fixed positions), XFA technology: dynamic, filling is easy, but form creation is complex, deprecated in PDF 2.0! By converting HTML + CSS to PDF: Everyone knows HTML! Everyone knows CSS! Why would you create a template in another (proprietary?) format? Create content in HTML, convert to PDF with pdfHTML. HTML to PDF conversion with pdfHTML2
  • 3. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA CSS examples  No CSS,  Inline CSS,  Header CSS,  External CSS.
  • 4. © 2015, iText Group NV, iText Software Corp., iText Software BVBA No CSS: HTML + pdfHTML code HTML to PDF conversion with pdfHTML4
  • 5. © 2015, iText Group NV, iText Software Corp., iText Software BVBA No CSS: result HTML to PDF conversion with pdfHTML5
  • 6. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Inline CSS: HTML + pdfHTML code HTML to PDF conversion with pdfHTML6
  • 7. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Inline CSS: result HTML to PDF conversion with pdfHTML7
  • 8. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Header CSS: HTML + pdfHTML code HTML to PDF conversion with pdfHTML8
  • 9. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Header CSS: result HTML to PDF conversion with pdfHTML9
  • 10. © 2015, iText Group NV, iText Software Corp., iText Software BVBA External CSS: HTML + pdfHTML code HTML to PDF conversion with pdfHTML10
  • 11. © 2015, iText Group NV, iText Software Corp., iText Software BVBA External CSS: result HTML to PDF conversion with pdfHTML11
  • 12. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Adding a background HTML to PDF conversion with pdfHTML12
  • 13. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Background HTML to PDF conversion with pdfHTML13
  • 14. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Use in the context of pdfHTML Other convertToPdf() method: FileInputStream and PdfDocument Why do we need ConverterProperties? HTML to PDF conversion with pdfHTML14
  • 15. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA Use case: invoices For every customer you need:  Raw data that can be converted to simple HTML  A customer-provided CSS to apply styles  A customer-provided PDF as company stationery
  • 16. © 2015, iText Group NV, iText Software Corp., iText Software BVBA ZUGFeRD examples HTML to PDF conversion with pdfHTML16
  • 17. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA Responsiveness: HTML vs PDF
  • 18. © 2015, iText Group NV, iText Software Corp., iText Software BVBA HTML and different devices When creating an HTML + CSS file, you don’t always know how it will be viewed: HTML to PDF conversion with pdfHTML18
  • 19. © 2015, iText Group NV, iText Software Corp., iText Software BVBA HTML and different devices The content can be rendered differently based on the device: Header, main, left and right pane can be reorganized based on available space Navigation can be different on different devices Orientation can change (e.g. turn tablet from portrait to landscape) You can change the rendering based on Media Queries Change font, widths, image size, positions,…  Desktop screens: horizontal placement, smaller font-size,…  Mobile screen: larger font size, vertical flow,…  Print: hide interactive and animated features, use less color,… HTML to PDF conversion with pdfHTML19
  • 20. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Example HTML HTML to PDF conversion with pdfHTML20
  • 21. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Example HTML HTML to PDF conversion with pdfHTML21
  • 22. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Media Queries in CSS HTML to PDF conversion with pdfHTML22
  • 23. © 2015, iText Group NV, iText Software Corp., iText Software BVBA The problem with PDF on devices HTML to PDF conversion with pdfHTML23
  • 24. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Convert to different PDFs HTML to PDF conversion with pdfHTML24
  • 25. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Defining different page sizes HTML to PDF conversion with pdfHTML25 Introducing: Tagging Page sizes Media Device Description Create form
  • 26. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA Create your own tags
  • 27. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Tags student and date don’t exist HTML to PDF conversion with pdfHTML27
  • 28. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Extend the tag factory HTML to PDF conversion with pdfHTML28
  • 29. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Custom tags: custom functionality HTML to PDF conversion with pdfHTML29
  • 30. © 2015, iText Group NV, iText Software Corp., iText Software BVBA CSS applier needed More elaborate example: QR Code QRCodeTagCssApplierFactory extends DefaultCssApplierFactory QRCodeTagWorkerFactory extends DefaultTagWorkerFactory QRCodeTagWorker implements ITagWorker HTML to PDF conversion with pdfHTML30
  • 31. © 2015, iText Group NV, iText Software Corp., iText Software BVBA HTML + CSS => PDF HTML to PDF conversion with pdfHTML31
  • 32. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA iText DITO Under development
  • 33. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Design Interactive Templates Online 33 HTML to PDF conversion with pdfHTML
  • 34. © 2015, iText Group NV, iText Software Corp., iText Software BVBA Design Interactive Templates Online 34 HTML to PDF conversion with pdfHTML
  • 35. © 2015, iText Group NV, iText Software Corp., iText Software BVBA pdfHTML Tyrion Server Data HTML / CSSTemplate PDF Tyrion Designer SQL JSON XML ... Web application WYSIWYG Subset HTML Subset Bootstrap Data connections PDF PDF/A PDF/U A ... Tyrion SDK Interactive form Web form via web browser Request and submit data Front end Back end HTML to PDF conversion with pdfHTML35
  • 36. © 2015, iText Group NV, iText Software Corp., iText Software BVBA pdfHTML Tyrion Server Data HTML / CSSTemplate PDF Tyrion Designer SQL JSON XML ... Web application WYSIWYG Subset HTML Subset Bootstrap Data connections PDF PDF/A PDF/U A ... Tyrion SDK Interactive form Web form via web browser Request and submit data Front end Back end <Name> <Address> <Invoice items table (4 cols, headers, ...)> <Total> <Name> <Address> item qty price tot <Item> <Qty> <Price> <Tot> <Item> <Qty> <Price> <Tot> <Total>. Raf Hens Kerkstraat 108 9050 Gentbrugge item qty price tot Item A 4 100 400 Item B 1 10 10 Item C 17 45 765 Item D 2 50 100 Item E 1 70 70 Item F 4 250 1000 Item G 5 100 500 Item H 12 3 36 Item I 1 100 100 Item J 1 35 35 Item K 1 250 250 3266. Raf Hens Kerkstraat 108 9050 Gentbrugge item qty price tot Item A 4 100 400 Item B 1 10 10 Item C 17 45 765 Item D 2 50 100 Item E 1 70 70 Item F 4 250 1000 Item G 5 100 500 p 1/2 item qty price tot Item H 12 3 36 Item I 1 100 100 Item J 1 35 35 Item K 1 250 250 3266. p 2/2 HTML to PDF conversion with pdfHTML36
  • 37. © 2015, iText Group NV, iText Software Corp., iText Software BVBA© 2015, iText Group NV, iText Software Corp., iText Software BVBA Thank you!