Dynamically created PDF forms

Posted by: Uomo Del Ghiaccio

Dynamically created PDF forms - 06/26/07 11:06 PM

I would like the feature to dynamically create a PDF file that included PDF form elements for a process that is dynamically created as a PDF and emailed out, but is to be filled out and returned.

Posted by: Philippe F.

Re: Dynamically created PDF forms - 06/29/07 11:39 AM

Hi Uomo,

Unfortunately, this isn't a simple matter. Adobe has put limitations on PDF forms (called PDF collaborative features, formerly known as FDF...).

While we can use some fairly simple passthroughs in PlanetPress documents to generate fillable fields on a PDF, there's no way of retrieving the values from those fields easily unless you have a Web process that can receive values on a URL (which has many limitations). Saving the values in a file (the "FDF" file of old) is not possible anymore unless the original PDF was created by an Adobe application and the viewer application has the appropriate and authorized plugin...

This used to be possible years ago, but not anymore. We are currently evaluating our options to provide similar functionality.
Posted by: Uomo Del Ghiaccio

Re: Dynamically created PDF forms - 06/29/07 11:55 AM


I've got it sort of working with some OL assistance. (Thanks) This chunk of code will give me the text so I can print it out and if I save the file I can email it back to the sender for processing.

 % Define a unique textfield name
define(&tfName, string, 'MyTextField')

% Create the PDF textfield
% Set textfield Location
passthrough('[ /Rect [ 0 0 ' + floattostr(&Width * 72) + ' ' + floattostr(&Height * 72) + ']')
% Set textfield Name
passthrough('/T (' + &tfName + ')')
% Set field type to textfield and make printable
passthrough('/FT /Tx /F 4')
% Set border width and style
passthrough('/BS << /W 1 /S /S >>')
% Set border and background color in RGB
passthrough('/MK << /BC [ 1 0 0 ] /BG [ 1 1 1] >>')
% Set text attributes
passthrough('/DA (/Helv 10 Tf 0 0 0 rg)')
% Set default value
passthrough('/DV (Enter your name here)')
% Finalize textfield
passthrough('/Subtype /Widget /ANN pdfmark')
% Create PlanetPress visible border
This will put a PlanetPress box around the textfield. The size uses the PlanetPress objects height and width variables. I don't think that the default value is doing anything though.

I have code for a PostIt like comment in addition to the URL and button code in the version 3 boards.

I don't seem to be able to mix and match between the different types on the same form, but it could be page specific. The other odd behavior is if you put a false condition on the object it still will appear anyway.

Posted by: Uomo Del Ghiaccio

Re: Dynamically created PDF forms - 07/03/07 05:06 PM

Is there anyway to set the "Enable Usage Rights in Adobe Reader" like you can with LiveCycle?

Such as mentioned by Adobe... "Enable form features in Adobe Reader. Enable users of Adobe Reader software* to type information directly into Adobe PDF forms and save them locally for offline use.
Posted by: Philippe F.

Re: Dynamically created PDF forms - 07/04/07 09:29 AM

I believe that's one of the limitations with later versions of Adobe applications: only Adobe-produced PDF forms can have their contents saved to a file.

As for your previous post, if you can actually get this to work with a recent version of Adobe Reader (7 and up), I'd be very interested to take a look at the document.