View
1.015
Download
2
Embed Size (px)
DESCRIPTION
iText Summit 2012 10:45 AM - 11:15 AM Creating PDF on Android / Google App Engine Bruno Lowagie, Founder of the iText Software Group.
Citation preview
iText for Android / GAE Bruno Lowagie
What is iText?
Java
C#
Web applicaBons
Cloud services
.NET
JVM
Java, Groovy, Scala,...
C#
Online versus Local
Online PDF Genera-on • Your invoice • Your plane Bcket • Your bank statement • Your site’s staBsBcs • Output from a web app • Print on Demand • ...
Local PDF Genera-on • Output from a desktop app • Digital signatures • Private data
– Calls log, contact list,... – Photos, scans,...
• Offline use – Document as data container
iText for Mobile?
Let’s make an Android port
• Forbidden classes: – PdfGraphics2D: removed – java.awt, java.nio,... references: removed – java.awt.Color: com.itextpdf.text.BaseColor
• Reduced version based on iText 5.0.7
Lessons learned
• PDF creaBon on Android is as easy as PDF creaBon in a “normal” Java applicaBon.
• PDF viewers on Android support only a limited subset of PDF funcBonality: – No annotaBons, such as links, form fields,... – No cool stuff, such as portable collecBons,...
• Security: – Problems with BouncyCastle – Problems connecBng to smartcard reader
Let’s make an Android port
• Forbidden classes: – PdfGraphics2D: removed – java.awt, java.nio,... references: replaced – java.awt.Color: com.itextpdf.text.BaseColor – java.awt.*: com.itextpdf.awt.*
• Security: BouncyCastle problems – Use SpongyCastle instead
• Full version based on 5.2.1-‐SNAPSHOT
We have a port for GAE!
Major difference: no access to a file system! • You can’t write to a file – Use a ByteArrayOutputStream instead
• Need a different way to access resources – Fonts: create with byte[] – Images: create with byte[] – PDFs: create a PdfReader with byte[]
Demo’s PDF creaBon
Demo PDF manipulaBon
Filled out, then signed
Lessons learned
• PDF creaBon on mobile devices: – OK for private data – Normally, you’ll create documents in the cloud
• PDF manipulaBon: – Document as data container – Can be used to sign documents!
• Security: – It would be cool if we could connect to a smartcard reader
On our roadmap
• Demo Google App Engine – Google AnalyBcs + Google Charts
• Demo Heroku – Watermarker
• Demo CloudFoundry – ???