4. 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?
5. 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
6.
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
8. 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
9. 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[]
16. 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
17. On
our
roadmap
• Demo
Google
App
Engine
– Google
AnalyBcs
+
Google
Charts
• Demo
Heroku
– Watermarker
• Demo
CloudFoundry
– ???