Print Page | Close Window

Create static PDF from dynamic XFA

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1486
Printed Date: 22 Nov 24 at 11:36PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Create static PDF from dynamic XFA
Posted By: MarianAldenhoevel
Subject: Create static PDF from dynamic XFA
Date Posted: 16 Jun 10 at 8:43AM
Hi,


I have an application that uses (very) dynamic XFA-Forms as front end. The data entered is sent to my program via EMail in XML Format. The system validates and processes the data and responds with a PDF that is a read-only version of the form.

The way this is currently implemented is this: We design a read-only version of the form with all the dynamic elements in place. We replace drop-down elements with text fields and set it all to read-only, such things. We save this as template.

The system then injects the modified XFA data into this template. We use iText for this step.

So the resulting PDF is still a fully dynamic XFA form, javascript and all, only one with no user-editable elements.

What we would prefer is a more simple static result to be returned and are currently investigating options to do that.

I have downloaded the QuickPDF trial version for Delphi and modified one of the examples to load my form and examine it.

FormFieldCount returns 0. OK, it is not an AcroForm.

GetXFAFormFieldCount returns 1. But GetXFAFormFieldName returns an empty string. What is the explanation for that?

Short of creating the resulting read-only incarnation of the form from scratch in code using the primitives available, what options do I have?

I currently don't have a public sample for such a form but I could design a (somewhat simpler) one if it would help.


Ciao, MM



Replies:
Posted By: MarianAldenhoevel
Date Posted: 16 Jun 10 at 10:01AM
The example PDF is here:

http://www.marian-aldenhoevel.de/tmp/P7.blank.pdf


Posted By: Dloz76
Date Posted: 10 Feb 11 at 2:48PM
Hi,

I was wondering if you were able to get this working?  I have dynamic XFA forms that users fill out and save to a database and I need to "flatten" them so they can be merger together.

Thanks,


Posted By: Rowan
Date Posted: 17 Feb 11 at 11:01AM
Are you talking about a static PDF form or a static PDF with no form fields?

If you open your PDF in any PDF viewer you will notice a little problem. If you don't want to use this PDF in Adobe only products you will actually need to go back to the start and re-create the PDF form, this time without using the Reader Extension feature and other features related specifically to Adobe products.

You can see a blog post I wrote on this topic a while ago:

http://www.4xpdf.com/2009/08/this-pdf-form-restricts-some-operations/ - http://www.4xpdf.com/2009/08/this-pdf-form-restricts-some-operations/

But as for your question, it might be possible to convert a dynamic PDF form to a static PDF form using Acrobat -- though I have a feeling that it isn't possible -- but you can't do this using any 3rd party tools.

I would highly recommend that you create PDF forms that use AcroForms form field and not XFA form fields because AcroForms are part of the PDF specification while XFA form fields are a proprietary format with a normative reference in the PDF spec. AcroForms are widely supported by most PDF vendors while XFA is not as widely suported.

I hope this helps.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk