Show last authors
1 {{content/}}
2
3 {{figure image="pdf_fill_0.png"}}{{/figure}}
4
5 {{figure image="pdf_fill_1.png"}}{{/figure}}
6
7 The action [[PDF (Fill)>>doc:WebHome]] is used for filling existing PDF forms. So that fields in the PDF form can be filled with content of a form element, the structure of the PDF document must be known. The easiest way to get to this information is to open the PDF form with the program, with which is has been created.
8
9 Another possibility is the use of the online tool PDFEscape. which you canfind under the following address: [[pdfescape.com>>url:http://pdfescape.com]]. Here you can upload a PDF document and edit and analyse it. If you chose a form element in the PDF with the left-click, than you right-click to the //opject properties//. Here you can than consult and if necessary change the current name under //name//.
10
11 == Preparation PDF ==
12
13 === Fonts ===
14
15 All characters set for a form field in the PDF document must be available in the font set for this field. The font itself must be embedded in the PDF document as well. Additionally, you should validate all {{formcycle/}} form fields whether they contain any characters not supported by the font.
16
17 For example, when you only wish to support English, set a font for English and validate that all form field only contain letters, numbers, and punctuation; but not Chinese or Arabic characters etc.
18
19 === Analyse PDF ===
20
21 Form fields in a PDF document have like in a {{formcycle/}} form all a certain name.
22
23 Open the PDF, which is to be filled, with a corresponding editor and note the name of the elements that you want to fill.
24
25 [[Radio buttons and checkboxes>>Formcycle.FormDesigner.FormElements.Selection]] always have a value for //on// and //off//! The value for //off// is in general //Off//, see figure.
26
27 === Assignment to form fields ===
28
29 Now the fields in the PDF document have to assign to a form element. There are two possibilities for this assignment (//Mapping//) between form field names and the PDF field names.
30
31 * In the PDF are the same field names used as in the form, e.g. //s1// or //tf1//. If this pertains, no alterations of the form are necessary.
32 * If the field names in the PDF cannot be changed anymore, then an [[alias>>Formcycle.FormDesigner.ElementProperties.BaseProperties]] must be used for the form elements. These are allocated directly in the {{designer/}} to an element on the right under //properties//. Indicate the name here, which is used in the PDF document.
33
34 === Conversion of form values ===
35
36 The value of the form element of the type pick list is not the value that is displayed in the form. For a pick list on the right under //properties// //text//, //value// and //title// can be allocated in the {{designer/}}. //Text// is the text that is displayed in the form for the user, //value// is the text that is used internally in the HTML and at the PDF filling.
37
38 To now use the text of //text// instead of the //value//, there are functions, similar to the action type [[Word (Fill)>>doc:Formcycle.UserInterface.MyForms.WorkflowProcessing.Actions.WordFill.WebHome]]. For example to display the text of //text// of the form element with the name //sel1//, you insert //sel1-lsttxt// in the PDF instead of //sel1//.
39
40 To use an available function, you part their name with a hyphen and add it to the name or rather the alias of the form element.
41
42 === Conversion function ===
43
44 The following functions are available to change the values of the PDF.
45
46 {{table dataTypeAlpha="0" preSort="0"}}
47 |= Function |= Description|= Example|= Explanation
48 |lsttxt|For a form field of type selection, uses the text of the selected option instead of the value of the selection element. Stands for //list text//.|SEL1-lsttxt|Inserts the text of the selected option of the [[selection element>>Formcycle.FormDesigner.FormElements.Selection]] named //SEL1//.
49 |lsttitle|Uses the value of the title attribute of a form field element instead of its value, if present. Stands for //list title//.|SEL1-lsttitle|Inserts the title of the [[selection element>>Formcycle.FormDesigner.FormElements.Selection]] named //SEL1//.
50 |b64img|Interprets the value as a Base64 encoded image and inserts the image into the document.|edSig-b64img|Inserts the hand-written signature as an image. See the help pages on [[jSignature>>Formcycle.FormDesigner.CodingPanel.ScriptTab.HandwrittenSignature ]] for how to enable hand-written signatures for forms.
51 |[+]|Makes it possible to connect the values of two form fields. Takes the part before and after the {{code language="none"}}[+]{{/code}} and searches for form fields with those names.|FirstName[+]LastName|Connects the values of the form fields named //FirstName// and //LastName//.
52 |[br]|Inserts a line break {{code language="none"}}\n{{/code}}. Must be used together with the operator {{code language="none"}}[+]{{/code}}.|Word1[+][br][+]Word2[+][br][+]Word3|Inserts the values of the form fields named //Word1//, //Word2// und //Word3//, separated with a line break.
53 |[sp]|Inserts a space {{code language="none"}} {{/code}}. Must be used together with the operator {{code language="none"}}[+]{{/code}}.|Word1[+][sp][+]Word2[+][sp][+]Word3|Inserts the values of the form fields named //Word1//, //Word2// und //Word3//, separated with a space.
54 |[cb_]|Used with selection element that may have have multiple options selected. PDF specification require each option to have a unique name. This name must be the name of the {{formcycle/}} element suffixed with {{code language="none"}}[cb_<index>]{{/code}}. For example, the names for the two options of a select element called //sel1// should be {{code language="none"}}sel1[cb_1]{{/code}} and {{code language="none"}}sel1[cb_2]{{/code}}.|selChoice[cb_1]|The first option //yes// of a selection element named //selChoice//.
55 {{/table}}
Copyright 2000-2024