Skip to main content

5. Definition of positions in the PDF

There is an additional icon (a PDF symbol) in the overview of the created forms. The positions of the entries in the template PDF are defined in the following table. Any number of items can be created.

PositionenMenuEN.png

It is possible to generate a completed Test PDF directly in the backend. This allows you to quickly check whether all items are filled in correctly in the form. All published items are output, and the field name is displayed for form fields.
As no input data is available, the conditions are not checked, all fields and all pages are transferred to the test PDF.

PositionenTypEN.png

There are different types of positions:

  • Text position - Output of form content, texts and insert tags
  • Picture position - Output of image data
  • Barcode - Output of a barcode from form content, text, InsertTags

Creating the individual items:

a) Text positions
PositionenEN2.png

The information to be entered is set in the first section. The following options are available:

  • a field name from the form
  • a fixed text in quotation marks
  • InsertTags must also be set in quotation marks

In the example, these are the form fields lastname and firstname and a fixed text with a comma. These individual definition lines are strung together with spaces (no space before a comma). If the automatic space character is annoying in rare situations, you can switch it off.

A condition can be programmed for the output in the 2nd column. If the condition is empty, the position is always output. In the example, the comma depends on whether the firstname field in the form has been filled in (used). The comma is therefore only output if the firstname has been filled in.

The condition can also be inverted:
used     = field filled in / checkbox or radio button selected
empty  = field is empty / checkbox or radio button not selected

The fixed texts can also contain insert tags:

PositionenFelder2EN.png

In this example, "Berlin, 2018-02-04" or only "2018-02-04" entered in the PDF, depending on whether city is specified or not.

To cross check boxes, we use an "X" with the checkbox value in the condition:

PositionenFelder3EN.png

In the Remarks and notes line, you can save notes on the position, for example for checkboxes or radio buttons where only an "X" is displayed, the option can be described here for the backend view.

In the lower part of the backend form it comes to the position in the PDF where the selected information is entered and the font attributes.

PositionenFelder4.pngPositionenFelder4EN.png

DieThe Positionposition bestehtconsists ausof derthe PDF-SeitePDF page (beziehtrefers sichto aufthe die Seitepage in derthe Vorlage)template), demthe horizontalenhorizontal Abstanddistance vomfrom linkenthe Seitenrandleft undmargin demand vertikalenthe Abstandvertical vomdistance oberenfrom Rand.the Optionelltop kannmargin. auchOptionally, eina rechterright Randmargin eingegebencan werden.also Dasbe istentered. oftThis sinnvollis beioften Formularfeldernuseful vomfor Typform Textarea,fields woof derthe Zeilentexttextarea umbrechentype, soll.where Abhängigthe vonline dertext verwendetenshould Schriftartwrap. gibtDepending eson möglicherweisethe einefont konstanteused, Verschiebungthere durchmay Über-be unda Unterlängenconstant imshift Font.
Einedue guteto Möglichkeit,over- dieand Positionen zu ermitteln, ist das Ausmessen der PDF-Seitedescenders in Programmen,the wiefont.
A good way to determine the positions is to measure the PDF page in programs such as Photoshop. InThe einemoffset Positionstestcan kannbe schnellquickly der Versatz ermittelt unddetermined in dena anderenposition Positionentest eingerechnetand werden.
Hinweis: Die Positionen beziehen sich immer auf den Grund-Offsetincluded in denthe Formulareigenschaften.other positions.
Note: The positions always refer to the basic offset in the form properties

BeginntIf einea Positionsangabeposition mitspecification begins with + oderor ­-, dannthen wirdthe dieposition Positionis relativplaced zurelative vorigento Positionthe platziert.previous Beispielsweiseposition. kannFor manexample, durchthe Y-PositionY position "+5“5" diecan Ausgabebe aufused to set the output to 5 mm unterbelow derthe letztenlast Ausgabepositionoutput setzen.position.

b) BildpositionPicture position

FürThere die Einbindung von Bildern in das PDF gibt esare 4 Möglichkeiten:options for integrating images into the PDF:

  • EinSelect Bildan ausimage derfrom Dateiverwaltungthe auswählenfile manager
  • EinTake Bildan ausimage demfrom Upload,the alsoupload, ausi.e. demfrom Formularthe übernehmenform
  • EinAn Bild,image wasthat alsis contained in the form data as a DataStream in(e.g. denfrom Formulardatenthe enthaltensignature ist (z.B. aus der Unterschriften-Erweiterungextension do-while/contao-signature-formfield-bundle)
  • EinInclude Bildan überimage dievia the UUID derof Dateithe einbindenfile
PositionenBild1.pngPositionenBarcodeEN.png

BeiThe allenpage, Bildpositionenposition wirdand diesize Seite,are diespecified Positionfor undall dieimage Größepositions. angegeben.The Dasimage Bildis wirdalways immercropped aufto diethe angegebenenspecified Maße zurecht geschnittendimensions (MODE_CROP = ExaktesExact Format)format). ZusätzlichIt istis esalso möglich,possible eineto Bedingungspecify füra diecondition Einbindungfor anzugeben,inclusion, dasthe Bildimage wirdis dannthen nuronly eingebunden,included wennif diethe Bedingungcondition erfülltis ist.met. SoFor lassenexample, sichimages beispielsweisecan Bilderbe passendintegrated zuto einemmatch Auswahlfelda einbinden.selection field.

PositionenBild2.pngPositionenBild2EN.png PositionenBild3.pngPositionenBild3EN.png
PositionenBild4.pngPositionenBild4EN.png PositionenBild5.pngPositionenBild5EN.png
c) Barcode

BindenInclude Siea einenbarcode Barcodefrom ausyour Ihren Datendata in dasthe PDF ein:PDF:

PositionenBarcode.pngPositionenBarcode1EN.png

FolgendeThe Barcode-Typenfollowing zurbarcode Auswahl:types are available:
(typenabhängigdepending iston teilweisethe dertype, Zeichensatzthe eingeschränkt)character set is partially restricted)

2D-Barcodes2D bar codes

  • QR-Code - einfacheLow Fehlerkorrekturerror correction
  • QR-Code - mittlereMedium Fehlerkorrekturerror correction
  • QR-Code - bessereBetter Fehlerkorrekturerror correction
  • QR-Code - besteBest Fehlerkorrekturerror correction
  • PDF417 (ISO/IEC 15438:2006)
  • Datamatrix (ISO/IEC 16022:2006)

1D-Barcodes1D bar codes

  • Code 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9
  • Code 39 + ChecksummeChecksum
  • Code 39 Extended
  • Code 39 Extended + ChecksummeChecksum
  • Code 93 – USS-93
  • Standard 2 of 5
  • Standard 2 of 5 + ChecksummeChecksum
  • Interleaved 2 of 5
  • Interleaved 2 of 5 + ChecksummeChecksum
  • Code 128 AUTO
  • Code 128 A
  • Code 128 B
  • Code 128 C
  • EAN 8
  • EAN 13
  • UPC-A
  • UPC-E
  • 5-Ziffern UPC-Based Extension
  • 2-Ziffern UPC-Based Extension
  • MSI
  • MSI + ChecksummeChecksum (module 11)
  • Codabar
  • Code 11
  • Pharmacode
  • Pharmacode TWO-TRACKS
  • IMB - Intelligent Mail Barcode - Onecode – USPS-B-3200
  • Postnet
  • Planet
  • RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
  • KIX (Klant index - Customer index)

WieAs beiwith Textpositionen,text könnenitems, hiervarious ver­schiedeneform Formulardaten,data, Textetexts undand Insert­Tagsinsert verknüpfttags werden.can Derbe re­sul­tierendelinked Texthere. wirdThe resulting text is encoded in demthe Barcodebarcode. kodiert.The Derbarcode Barcodeis wirdnormally normalerweiseoutput in derthe Standardfarbestandard ausgegeben,colour; möchtenif Sieyou einewant andereto Farbeuse verwenden,a gebendifferent Siecolor, dieseenter imit Feldin Textfarbethe überschreibenOverwrite an.text color field.

PositionenBarcode2.pngPositionenBarcodeEN.png

DarunterBelow gebenthis, Sieenter diethe Positionposition imin the PDF undand diethe Größesize desof Barcodesthe an.barcode. ZusätzlichIt istis esalso möglich,possible eineto Bedingungspecify füra diecondition Einbindungfor anzugeben,inclusion; derthe Barcodebarcode wirdis nuronly eingebunden,included wennif diethe Bedingungcondition erfülltis ist.met.