Who's Afraid of Promissory Estoppel: Charitable Giving in ...
Who's afraid of XFA?
-
Upload
itextpdf -
Category
Technology
-
view
150 -
download
1
Transcript of Who's afraid of XFA?
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
1
PDF Days Europe 2015
Who’s Afraid of XFA?
Bruno LowagieFounder/CEO of the iText Group
1
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Do you know XFA?
Question 1:
2
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Do you really know XFA?
Question 2:
3
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Are you afraid of XFA?
Question 3:
4
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Votes against XFA
5
Results of a PDF Association survey
ISO 32000 ballot
Documentation and ballot result
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
What is XFA?
What is this about?
6
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
AcroForm technology
• Introduced in PDF 1.2 (1996).
• Uses PDF syntax: AcroForm dictionary, Fields array, Field dictionary, Widget annotation,…
• Data consists of key value pairs with limited hierarchy.
• Static: position of every field is fixed, specific rectangle(s) on specific page(s).
• The technology is standardized, but it didn’t evolve; it lacks some essential functionality.
XML Forms Architecture (XFA)
• Introduced in PDF 1.5/1.6 (2003/2004).
• Defined using XML: template, datasets, data description, data,…
• .pdf: PDF as container of XML,
• .xdp: XML as container of PDF.
• Data is pure XML using an XSD of your choice.
• Dynamic: the form adapts itself to the data, repeating subforms for headers, table rows,…
• The spec is huge and not an ISO standard.
Two form technologies
7
Note: in the context of this talk, I won’t be discussing hybrid forms
consisting of XFA + AcroForm aka “static XFA” aka XFAF
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
AcroForm example
8
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
AcroForms can be used as a template
9
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
XFA example
10
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
This form can grow dynamically
11
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Warning: XFA has undocumented features
12
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Con• Not “viewer-friendly”:
• Only “decent” support by Adobe Acrobat/Reader. Support by other viewers is inexistent to incomplete.
• No XFA on mobile devices.
• XML-based:• Slow rendering for large docs
• Too complex:• Many different ways to achieve the
same goal (supporting every possible option is a burden)
• Adobe owns XFA:• Not an ISO standard: continuity?
• Adobe’s position on XFA makes other vendors doubt if they should invest in XFA; see Foxit, Nitro, Nuance’s position towards deprecation.
Pro• Dynamic document:
• The data shapes the document,
• Fields can adapt to their content,
• Variable number of pages,…
• XML-based• You can use your own XSDs,
• There’s a clear separation of data and presentation,
• Easy to extract/exchange data.
• Functionality
• More flexibility,
• More feature-rich.
• Adoption by vendors• Adobe Acrobat/Reader, LiveCycle,
SAP Interactive forms by Adobe.
• Viewers: partial support by Foxit, Nitro, Nuance, Preview,…
• Designer: Avoka SmartForm
• Server tools by iText, IDR (e.g. IDR converts XFA to HTML 5 to render a form on mobile devices).
Some pros and cons of XFA
13
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Retain XFA in PDF or deprecate it? (Option B)
14
Are these arguments valid?• XFA isn’t for archiving!
• XFA isn’t for engineering!
• XFA isn’t for printing!
What is XFA really about?
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
What are forms used for? Let’s search Google…
15
Is this really
what we do
with PDF
forms???Example: encoding
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
No seriously, what are PDF forms used for?
16
In many cases, PDF Forms are used as templates to
be filled out and flattened by machines!(The word “form” can be misleading in the context of PDF.)
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Creating a simple XFA template
17
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Importing your business logic into a dynamic form
18
Custom XSD, not XFA specific!
Imported as data source
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Reorganizing the (sub)form(s)
19
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
The result: an empty form
20
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Inject your XML: a filled out form
21
Rendered as PDF
DATA
PRESENTATION
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
The document is the data
22
Your XML is here
Now flatten it into PDF 2.0, PDF/A level A, PDF/UA,…
AcroForms
would force
you to change
your schema
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Think of ZUGFeRD!
23
Current approach:• Using XSLT to convert XML to intermediary format that is then converted to
PDF. For example: ZUGFeRD documentation ships with XSLT 2.0 examples
that require proprietary software (Altova).
• Using HTML? HTML is not a document format! Defining a layout in HTML is
problematic. At iText, we call it “poor man’s XFA”.
• Companies are reinventing the wheel to create PDF along with XML (which is
a lucrative business model, as long as you’re not a technology evangelist).
Possible solution:• The document is the data if you combine a CII with an XFA template.
• A multi-purpose XFA to PDF/A-3 convertor is all you need to create a
ZUGFeRD compliant invoice.
+ =CII
(extended)
Structured CII compatible
XFA template
PDF/A-3A
ZUGFeRD
machine
human
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Why is this important?
24
Let’s talk about
enterprise form solutions
and workflows!
A document is never
“only” a document
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Online
registration:
forms and
data sources
Processing
data,
XML-based
workflow.
Persist,
Publish,
Sign,
Archive.
Use case: eGriffie (Belgian Department of Justice)
25
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Retain XFA in PDF or deprecate it? (Option A)
26
and iText!
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Is there a market? Are there alternatives?
27
• Is there a market for enterprise form solutions?
• Microsoft has abandoned InfoPath
• Adobe is losing the LiveCycle market (and what about SAP?)
• Customers are asking us (iText) to fill the gap
• There is a market! It is huge! It is unserved!
• Are there alternatives for XFA?
• Create PDF and XML from code: e.g. have your CRM produce
CII invoices as well as PDF/A-3 invoices and combine both
into a ZUGFeRD-compliant PDF.
• Create PDF from XML by first creating an intermediary
document and then convert this other “template” to PDF:
• Create a Word document first
• Proprietary formats (Inventive Designers, JasperSoft,…)
• XSL:FO (Apache FOP, RenderX, Inventive Designers,…)
• XSLT 2.0 (Altova)
• Forget about PDF for our enterprise documents:
• Pure XML (e.g. EDI)
• HTML 5
• Word, Open XML,…
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Is the deprecation of XFA a problem?
• No, because:
• We can keep on creating XFA templates based on ISO-32000-1
• We can convert PDF 1.7 files with XFA content to PDF 2.0, PDF/A, PDF/UA,… document, so it doesn’t matter if XFA can or can’t be used inside a PDF 2.0 document
• XDP and PDF are separate things, let’s use XDP instead of PDF (this is a suboptimal option!)
• Yes, because:
• Deprecation of XFA might be perceived as an indication that the technology will no longer be supported (which isn’t necessarily true)
• We need an XML-friendly template format that is PDF-aware, and there is no alternative for XFA
• Part of the industry might be reluctant to adopt PDF 2.0, because:
28
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
What if we deprecated XFA only partially?
29
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
How would we phrase this in ISO-32000-2?
• Let’s remove all the XFA-related content from ISO-32000-2 (this is already happening), but keep the XFA entry in the AcroForm dictionary (remove the word “deprecated”).
• Add: when the XFA key is present, a conforming PDF writer shall not write a Fields key.
• This deprecates static XFA (XFAF) de facto. That’s perfectly fine, because there is a valid alternative: AcroForm technology.
• This removes one of the most annoying confusions for users: being confronted with a form that contains both technologies.
• Add: when the XFA key is present, the file extension of the document shall be .xfa
• The PDF spec doesn’t define a file extension for PDF files anywhere (why would it? Not all PDF documents are files).
• However, there’s 12.7.8.1: “FDF is based on PDF; it uses the same syntax and has essentially the same file structure. However it differs from PDF (…) FDF files have the extension .fdf.”
• XFDF is another format that is mentioned in ISO-32000-2, but it’s defined completely outside ISO-32000-2.
• This way, we don’t deprecate XFA: we define it as a separate format using PDF syntax with essentially the same file structure, but with some significant differences.
30
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
Implicitly, this means that:
• Conforming writers are allowed to create XFA templates based on the PDF 2.0 specification:
• Just like they are allowed to create FDF files!
• They use PDF 2.0 as a means to create enterprise-grade templates that are to be processed on back-end systems, not as end-user forms for people to fill out manually on the front-end.
• Conforming processors are allowed to ignore XFA, although:
• They can read the document’s objects, because the file structure is essentially a PDF file structure. Just like with some FDFs, they aren’t supposed to be able to render the full document.
• They should show a warning message similar to what happens if you want to view an FDF file without having access to the full form, or show a warning page similar to what happens when an encrypted PDF using an unsupported encryption method is encountered.
• Conforming processors are allowed to process XFA, to
• Inject XML data into a template.
• Render the XML based on the template and the business rules:
• Either to a specialized XFA viewer,
• Or to a genuine PDF file (PDF 2.0, PDF/A, PDF/UA).
31
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
If XFA didn’t exist, we’d have to invent it, because…
• It’s an envelope for data and presentation:
• Keeping the data separated and unaltered,
• Containing rules to shape the data, eventually resulting in a page-based document.
• It’s a template format that is PDF-aware:
• You can embed PDF pages as company stationery,
• You can embed fonts, which is important if you want to convert XML to PDF/A,
• You can add real (binary) PDF objects, e.g. there’s no need to use Base64 encoding for binary content.
• It can build a bridge between XML and PDF:
• XML is the format of choice for transporting data in many different industries.
• XML is highly structured, which is important if you want to convert to Tagged PDF.
• PDF/A and PDF/UA should be the formats of choice to archive and distribute documents. XFA can become a catalyst to create such documents.
32
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
If XFA didn’t exist, we’d have to invent it, but…
• We need to simplify it!
• Clean up the spec,
• Remove redundancy,
• Remove undocumented features.
• Evangelize it!
• Make sure it is used in the right context: templates not forms to be filled out by humans.
• Offer technology that converts XML into “smart” PDFs (PDF/A, PDF/UA) when data needs to be published for human consumption.
• Make it a standard, or at the very least:
• Make a commitment to 3rd party vendors (continuity!),
• Explore which parts we can legally use,
• Avoid having to reinvent the wheel by creating “yet another standard” as a valid alternative to XFA.
33
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
One last question:
Who’s Afraid of XFA?
34
A PDF Association Presentation · © 2015 by PDF Association · www.pdfa.org
www.pdfa.org
2015-06-08
Bruno Lowagie,Founder/CEO iText Groupitextpdf.com
35
PDF Days Europe 2015
Thank you! Any questions?
Get in touch: [email protected] site: http://www.itextpdf.comTwitter: @iText @bruno1970
35