Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/06/2010, 06:45
jaldepiqui
 
Fecha de Ingreso: abril-2010
Mensajes: 17
Antigüedad: 14 años
Puntos: 0
Respuesta: FDF sin librerías. Bajar formulario PDF rellenado.

Hola de nuevo:

He progresado bastante los últimos días. Resulta que para el PDF hay dos tipos de formularios: los FDF que se crean con Adobe Acrobat y los XFA que se crean con Livecycle, los cuales son bastante distintos. La cuestión es que he creado un formulario con Acrobat y sí que ha funcionado lo de llenarlo mediante la cabecera vnd.fdf, pero me hace falta que funcione sobre el formato XFA ya que el formulario que empleo es bastante complejo.

Hay tres maneras de rellenar un formulario XFA: (copio y pego de http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=23498)

Cita:
Unfortunately LiveCycle (XFA) files don't really get along with FDF. They require an XML format, the gramar depends on how you've setup your form. But there are several different ways to get around this problem.

1. An XDP package, i.e., an XML file in the LiveCycle XFA Data Package gramar, can include an embedded form. When Acrobat loads the XDP it will automatically open the embedded form and populate it with the data in the XDP datasets section. You can see what this looks like by exporting an XDP package from Acrobat Pro that includes both the form data and the embedded form. So the idea here is to have a basice XDP file on the server. The PHP script modifies the datasets section of the XDP with the data on the HTML form and returns a link to the modified XDP to the client. Since this is all XML you already have the tools you need in PHP to modify the XDP.

2. Create a simple XML file with the HTML data in it. Pass an FDF (in a link) back to the client that contains JavaScript directing the XFA form to load the XML data.

3. Create a simple XML file and pass an URL to the data in a query string format in the Link to PDF form. Then use JavaScript in the form to extract the URL and load the data. Stephan Cameron (http://forms.stefcameron.com/) has a blog entry on this topic.

4. Give up on LiveCycle and use an AcroForm with the original FDF methodology.
Me interesa sobretodo la primera, es decir, generar un archivo el cual acceda al PDF, lo rellene y lo baje. Por eso si alguien tiene alguna idea de cómo hacerlo estaría más que encantado. Sinceramente no he buscado mucho aún sobre esta forma, pero más que nada os quería comunicar los progresos.