| The comp.text.pdf Frequently Asked Questions | ||
|---|---|---|
| <<< Previous | Next >>> | |
Q: We use Word for producing forms, which I then dutifully run thru Distiller to get pdfs. Now I'd like to go to the next stage, which is putting in form fields so people can fill them out onscreen rather than on paper. Now the only option that I can see is that either (a) I get busy with the Acrobat Exchange form tool (boring, and the forms are vveeerryy long) or (b) I get the people who create the forms to put in some marker in Word that gets converted by a Acrobat add-on to Acrobat fields or (c) install Acrobat on form producers' PCs and train them up (not more attractive than (a), really, and it's certainly expensive).
Can anyone advise on the possibilities of (b)? This must be a relatively common problem.
I've checked whether Exchange converts Word forms into Acrobat ones: no, it doesn't (in v3, not sure about v5). [Q69]
A: Here are your options, and there aren't many.
Learn all the intricacies of the Acrobat forms tools. It has many time saving shortcuts you can use. Learning how to duplicate and rename fields effectively can really cut down your development time. Also learn to "borrow" ready made stuff from other forms. You can easily cut your development time in half or less by using these shortcuts.
There's an excellent forms tutorial that explains these tricks. It's here:
http://www.planetpdf.com/mainpage.asp?webpageid=1155
Since you are using Word, you should seriously consider Caere Omni form. What it does is it opens a Word form and converts it to an Omni form, which can then be saved as a PDF form or HTML form. The conversion is not perfect, but you can expect about a 90% accuracy rate. It will even convert simple form functions and calculations for you. I highly recommend it, and the price is right.
Another option is to import your Word files into a PDF savvy app like FrameMaker or PageMaker, and let them perform the PDF conversion. FrameMaker has a feature called PostScript frames which allows you to manually enter the PostScript or pdfmark code required for generating PDF form fields. PageMaker has a third party plugin you can purchase. It simulates the Acrobat forms tool. I have yet to find a way to do this with Ventura.
And the last way I know, is to include pdfmarks directly in your Word documents, by inserting them through Word's field codes. Thomas Merz has an excellent pdfmark primer that explains how to do most of these procedures. It's free. Get it here: http://www.pdflib.com/pdfmark/index.html
Bryan Guignard (bryang@sympatico.ca) [A117]
Q: Can anyone confirm that it is not possible to put an image (jpg/gif) into a form element? I would be happy to convert the image to pdf and then placing it into the form if that needs be. I want to make a pdf document service on our website that provides our customized data and allows the user to upload their logo to place into the document. At this point, I think we need a form (FDF) which will act as a template container, into which we can populate from the database and HTML form, which will include images..... Can anyone provide some pointers, even if to say, its not possible. [Q70]
A: If you make the form of type Button, and select Icon only to display, you can choose a pdf as the icon. this effectively puts a pdf inside a pdf, and, if the pdf is an image, your problem is solved.
Its even easier in Acrobat 5, which allows you to select most bit mapped image formats as icons for buttons.
Dan Sideen (dansideen@home.com) [A118]
A: Yes, you can. Put the field values into session variables, then assign the variable name to a form field using the FDFSetValue method available in the FDF toollkit from Adobe. You can code in VBScript (preferred) or Javascript.
Here is some sample code that does that, then displays the data in a "master" pdf
Set FdfAcX = Server.CreateObject("FdfApp.FdfApp")
Dim objFdf
Set objFdf = FdfAcX.FDFCreate
name = Session("name")
address1 = Session("street") & " " & Session("poboxorfloor")
address2 = Session("city") & " " & Session("province") & " " &
Session("postalcode")
title1 = Session("title1") title2 = Session("title2")
email = Session("email")
objFdf.FDFSetValue "name", name, Off
objFdf.FDFSetValue "title1", title1, Off
objFdf.FDFSetValue "title2", title2, Off
objFdf.FDFSetValue "address1", address1, Off
objFdf.FDFSetValue "address2", address2, Off
objFdf.FDFSetValue "email", email, Off
objFdf.FDFSetFile
"http://warehouse.informco.com/asp_projects/liberty/lib06_D.pdf"
Response.ContentType = "application/vnd.fdf"
Response.BinaryWrite objFdf.FDFSavetobuf
objFdf.FDFClose
Set objFdf = Nothing Set FdfAcX = Nothing
|
Dan Sideen (dansideen@home.com) [A119]
Q: Many forms are available in PDF format. I was wondering if there is a package that will allow the user to fill them out onscreen before printing them out? Note that I am not looking for the user to edit them, only to fill the blanks. [Q72]
A: Acrobat can make any (unprotected) PDF file into a fillable form. Try for instance http://www.quite.com/box/qboxbuy1.pdf (it's an order form, but don't worry, you'd have to print and fax it to order).
Aandi Inston (quite@dial.pipex.com) [A120]
A: Acrobat Reader, if the forms already have fillable form fields.
Acrobat (full distribution), if you need to add any fields, including submit/import methods. Once you've added the required fields, Acrobat Reader, operating as a plugin in your browser, as well as a live TCP/IP connection, is enough to fill, submit, and import data with your form.
If you've deduced this means you can save form data (not PDF, but FDF), using Acrobat Reader, you are correct. See http://segraves.tripod.com/index3.htm for a couple of simple examples.
You DO NOT have to be connected to the internet to do this. It works fine with a web server running on the same computer with the browser, i.e., "localhost".
Bill Segraves (wsegrave@mindspring.com) [A121]
A: Yes. Most easily, by the CGI generating an FDF file and delivering that.
Aandi Inston (quite@dial.pipex.com) [A122]
A: No and Yes!
No: CGI can't do it, as it is a standard, i.e. Common Gateway Interface.
Yes: You could write a script in a CGI-compliant language, e.g., Perl, that would generate a FDF file with the field names and associated values in it. For an example, please see http://segraves.tripod.com/index3.htm. You can see the required format of the FDF by simply submitting a blank form.
Bill Segraves (wsegrave@mindspring.com) [A123]
A: Get the adobe FDF toolkit from www.adobe.com. It contains Activex controls and is useable in C++, VB, VBS, ASP and Java to automate the creation of separate fdf files. The populated forms can then easily be displayed inside a browser just by pointing to the fdf. This loads the "parent" pdf, and fills the fields.
Dan Sideen (dansideen@home.com) [A124]
Q: When I do a setValue("fieldname", a Java String, false) if the java string has a french character inside (like an accented character), they are transformed in the document and not property I use the Times Roman font in the fields. [Q74]
A: The Java version of the FDF toolkit is horribly broken with respect to special characters. It uses the Java Native Interface (JNI) for attaching C libraries to Java, and the JNI relies on UTF-7 encoding. This doesn't seem to be implemented in the FDF toolkit, so the Java FDF toolkit is unusable from a European point of view. I haven't yet tested the new version 5 of the FDF toolkit.
Thomas Merz (tm@pdflib.com) [A125]
Q: When I create the form with the full version of Acrobat 5.0 using a java script -- the email function works great. When I access the form with Acrobat Reader 5.0 the function does not work. Does anyone have any recommendations on the best way to email forms using the Reader? [Q75]
A: Use a CGI or ASP. Except in very limited circumstances (centrally controlled intranets) sending direct e-mail is completely impractical. This limitation is nothing to do with Acrobat.
Aandi Inston (quite@dial.pipex.com) [A126]
A: You should forget the idea of sending e-mail directly from the client for at least two reasons. 1. You cannot reliably send e-mail from user's machines. Millions of people do not have working e-mail programs, relying instead on services like Hotmail. Others use e-mail programs that can't be automated. 2. The free Acrobat Reader can't e-mail. So, what you do instead is have your web process (typically an ASP or CGI) send the mail. However, it won't have access to the whole form, only an FDF file.
Aandi Inston (quite@dial.pipex.com) [A166]
Q: In the submit button on my PDF form I reference the URL of my Uniface program. In my Uniface program I then expect the FDF data to be in the first parameter/input to the form. But I only get the first line of the FDF file! Could someone explain to me how the submit action works with the PDF file and how is parses data to a CGI program. [Q118]
A: The entire FDF file is generated and sent as a single stream of data to the web server. It is not sent as lines (http has no concept of line breaks in the data portion). If you don't get the whole thing, this must be a problem with your chosen interface language/system. Possibly, there's a way to get more data. Possibly, the line endings in the FDF upset the development system (they could be CR, CRLF or LF; a program must be cabable of understanding all the combinations.
Aandi Inston (quite@dial.pipex.com) [A170]
A: FDF = Forms Data Format It is an ASCII based file format. It's designed to hold the data a user fills into a PDF form so it can be submitted to a web server for processing. Also, it can contain processed data that a web server can send back to the user. The most common way of creating an FDF file is to fill out a PDF form and click the SUBMIT button. This is the only option if you are using Acrobat Reader. However if you have the full commercial Acrobat package you also have an option to save FDF file(s) to a local disk. A special version of FDF is also used to store PDF comments data. One big advantage FDF has over regular HTML forms data is that it can contain vector and bitmap graphics as well as text. The PDF specification document contains the entire FDF specification. It's a free download (7 megs) from the Adobe website.
Bryan Guignard (bryang@sympatico.ca) [A185]
Q: There are a lot of fillable PDFs floating around now. The problem is, with Acrobat Reader, you can fill in the form but it doesn't allow you to save the data.
What's the minimum product that will allow the user to fill in a form, save the data to an FDF, retrieve it and print the filled-in form? [Q147]
A:
Acrobat Reader to fill in the form and submit the form data to a CGI server, which can be on the same computer as the User, if need be.
A one-line Perl script to convert the URL-encoded name=value pairs to FDF, returning same to the User's browser.
Although a one-line Perl script can do the job, it is hardly readable. At
http://segraves.tripod.com/index3.htm, you'll find samples of what can be done with this approach. The Perl scripts that do the job are a dozen or so lines of code, depending on whether null values are dropped or kept in the result, according to specific needs. This technology is used routinely for forms with hundreds of form fields.
William Alexander Segraves (wsegrave@mindspring.com) [A228]
A: Adobe Acrobat Approval. Just recently released.
(zevevet@hotmail.com) [A229]
A: A couple of suggestions:
You may wish to write a program/script to generate the FDF in the prescribed format. Get the script working from the command line before you try to implement it on a web server, fi that's your approach.
You may wish to use care in the choice of the Content-type: of what you send back to your browser from a CGI script on a web server.
MSIE5.X (and6) doesn't treat Content-type: text/plain kindly, as it ignores your specified Content-type: statement and attempts to guess the Content-type: from what's inside the data. This is bad because parts of the FDF look something like HTML tags. MSIE mangles it. See the form versions on http://segraves.tripod.com/index2.htm for a Content-type: text/html workaround for the MSIE problem using (obsolete) tags to wrap the plain text FDF data, forcing MSIE to display it as example text.
Of course, if all you wish to do is fill the PDF form, use the appropriate Content-type: application/vnd.fdf, together with, IIRC, the required "#FDF" at the end of the URL, if the URL-encoded form data originates from a PDF.
William Alexander Segraves (wsegrave@mindspring.com) [A249]
Q: I want to create a from which has individual boxes containing numbers representing the number entered, i.e.
Enter Sales Figure Here $ {}{}{},{}{}{}.{}{}
Ideally I would like users click on an entry "prompt" enter the sales figure i.e. 12134.56 and automatically the form would entry the separated figures into the appropriate boxes as above. Something like $ {} 1 2 1 3 4 . 5 6
Then I would like the above entered figure to be calculated (entry figure/9) and the result displayed into additional boxes further down in the form.
Not sure how this would be achieved, as I haven't found any tutorials on the web, nor any of my PDF form friends know how to do this. I know this is a bit of a hassle but form is required to be this way due to government regulation. [Q168]
A: If you know a little PostScript and pdfmarks, or if you care to learn (it's not that hard), then you can manually adjust the letter spacing of your form fields. It will be a bit more work to build your form and a tool like FrameMaker will really help, but it will solve this problem of yours in the simplest and most elegant way, and will eliminate the need for any further workarounds.
Otherwise you will have to resort to JavaScript tricks. Some are easier than others to implement, but the problem in general with these solutions is that it makes your forms behave in ways the average user is not used to. Those side effects may or may not be desirable or acceptable. Most of these JavaScript tricks are also pretty lengthy to implement. Cardiff has such a workaround for their forms solutions and it's enough to give a rocket scientist a headache! I did a code jump of the required scripts and printed it out. It's almost 50 pages long!! I wouldn't recommend such an approach to my enemies.
The best method, and the first one I usually recommend is to modify the form itself, by removing the {}{}{},{}{}{}.{}{} character dividers or boxes. These serve no purpose for electronic forms because they are artifacts of paper forms. If you can remove these artifacts and just leave the form that way then your problem is forever solved. However, as in the case of govt forms, many people still need printed versions for whatever reasons, and these artifacts can be useful. This is where the form field option "Hidden but printable" comes into play.
You strip all the {}{}{},{}{}{}.{}{} stuff out of the form, but you don't eliminate it completely. Instead you place these artifacts in a Hidden form field as a button icon, and you place a button on the form that says "Print Blank Form". This button will have a JavaScript action attached to it that will clear all the regular form fields AND change the "Hidden" field to a "Hidden but Printable" field, and is then followed by a print action. This way your artifacts will only show up on printed blank forms.
For users who need to print the form after it has been electronically filled out, then the regular print command from the Acrobat print menu, or the Acrobat button bar will do the trick. You can also place a simple "Print" button on the form with just a print action attached to it.
Otherwise users will fill out the form electronically and submit it, and these {}{}{},{}{}{}.{}{} artifacts will never enter the picture, because you don't include them in your list of fields to be submitted.
Bryan Guignard (bryang@sympatico.ca) [A256]
A: If you have Acrobat Reader you can fill in a form provided it has been made "fillable". Just move the cursor over the form and it will turn into an "I-beam" where you can type.
If you have the full Acrobat product ($249) you can add text to any PDF file which is not protected.
Aandi Inston (quite@dial.pipex.com) [A278]
A: A form is fillable if the creator of the form prepared it specially, using Acrobat. Here are two PDF files for you to compare, of an ever popular USA tax form: Ordinary PDF, not fillable: http://ftp.fedworld.gov/pub/irs-pdf/f1040.pdf Fillable version of the same PDF: http://ftp.fedworld.gov/pub/irs-fill/f1040.pdf
Aandi Inston (quite@dial.pipex.com) [A279]
A: You can only tell the difference by trying to fill the form. There is no other reliable way to tell. If you can't fill in that second file above, your copy of Acrobat Reader is too old or is broken.
Aandi Inston (quite@dial.pipex.com) [A280]
A: Not exactly. Three additional ways come to mind:
IMO, another reliable way to tell if a form is fillable is to open it with Acrobat, select the form tool, and "see" if there are any form fields. Of course, this only helps if 1. You have Acrobat, and 2. The form is not "locked".
Still another reliable way, if the form is not locked, is to add a "submit" button that exports ALL of the form data to a script (I use Perl.), capturing all of the form field names for whatever use to which you might wish to put them, e.g., the arguments of Perl & CGI param statements in a Perl script.
Finally, you could use "File + Export + Form Data" to export the FDF associated with the PDF. If there are no form fields, you will see no /T-/V pairs in the FDF. This apparently works, even if the form is locked.
So, you see, there are some very good reasons to have the full distribution of Acrobat. I hope the OP sees this, as well.
William Alexander Segraves (wsegrave@mindspring.com) [A282]
| <<< Previous | Home | Next >>> |
| Acrobat | Common questions about PDF |