Skip to main content
Skip table of contents

Barcodes

The PFBarcode tag can be used to generate different codes (e.g. QR, EAN13 or Code128) directly in the printformer editor. The text to be generated as a code can already be inserted in the InDesign template or later directly in the editor. A PFBarcode block can be created using a graphic or text frame. (If a text frame is chosen also Placeholder with datakeys can be used).

Creating a PF barcode block by using a text frame

  1. Draw a text frame (by using the Type tool) in your document (layer PFUserContent, not printing) and fill it with the content of the code (in this case, steps 3 and 5 can be skipped) or with a placeholder text (depending on the code: text or numbers).

  2. By right-clicking (> tag frame) or via the Tags panel, assign the tag »PFBarcode« to the frame.

  3. Then mark the text and select »PFPlaceholder« by right-clicking (> tag text).

  4. To determine the code type, add a corresponding attribute to the tag »PFBarcode« in the structure (> right click > new attribute), use type as name and enter the code type for the value: qr, ean13 or code128, more s. Barcode types table

  5. In order to be able to enter the content of the code in the printformer editor, the tag »PFPlaceholder« also needs an additional attribute: Name = data-keys, the value is freely selectable or a reference to an existing data source. If a placeholder code should be seen by opening the template in the printformer editor, the attribute Name: use-standard-text-if-empty, Value: true must be added to the tag.

Creating a PF barcode block by using a rectangle frame

If a graphic frame is used as a placeholder for a barcode, it is not visible in the editor until it has been filled with content via the form editor.

  1. Draw a Rectangle Frame in your document (layer PFUserContent, not printing).

  2. Right-click (> tag frame) or use the Tags menu window to assign the tag »PFBarcode« to the frame.

    In the structure add an attribute to the tag »PFBarcode« (> right click > new attribute), as name use type and for the value enter the code type: qr, ean13 or code128, more s. Barcode types table
    If necessary further attributes with editing restrictions can be added.

  3. In order to be able to insert the content of the code in the printformer editor, the tag needs an additional attribute: name = data-keys, the value is freely selectable or a reference to an existing data source.

  4. In addition, another attribute can be used for the barcodes to reduce the size of the barcode in the block so that a margin is created: name = margin, the value is freely selectable and is specified in point.

Example:

Colors

The colours of the code can be defined in InDesign by fill and stroke color
Fill color = background color;
Stroke color = front color.

In order to be able to switch colors later in the editor, the fill and/or stroke colour must be defined in InDesign. Also a color set must be assigned to the template in printformer (see Colors). If no color is assigned to the placeholder frame in InDesign, the generated code in the editor is black and has no background color (and cannot be changed later in the editor).

Upload and settings in printformer

After Upload into printformer, the form editor must be activated in the Editor menu. In order to be able to adjust the colors of the codes in the editor, a color set must be selected within color assignment.

preview/printing PDF

Not until the preview/print PDF is generated are the rules (specifications for size ratios/spacing) of Ean and Code128 applied (the display may therefore deviate from the editor). Ean and Code128 are embedded as vectors, QR codes are rasterised as PNG files.

Sample file

PF_Barcode_sample.zip

Attributes

name

value (restrictions)

use case

type*

s. Barcode types table

type of barcode

data-keys

One or more DataKeys (comma-separated) used to fill the code

margin

Integer

Value of the margin to the object frame in pt

inkSpread

Number (decimal notation with dot)

Educes the width and intensity of the single module spaces within the block

segments

Integer number
(Default = 4)

The segments option is used to specify the maximum number of segments per row which must be an even number.

dotty

true/false
(Default = false)

For matrix barcodes, render the modules as dots rather than squares. The dot radius can be adjusted using the inkspread option.

all standard attributes/block-settings

Barcode-Types

BWIPP-Codierer

Barcode Beschreibung

auspost

AusPost 4 State Customer Code

azteccode

Aztec Code

azteccodecompact

Compact Aztec Code

aztecrune

Aztec Runes

bc412

BC412

channelcode

Channel Code

codablockf

Codablock F

code11

Code 11

code128

Code 128

code16k

Code 16K

code2of5

Code 25

code32

Italian Pharmacode

code39

Code 39

code39ext

Code 39 Extended

code49

Code 49

code93

Code 93

code93ext

Code 93 Extended

codeone

Code One

coop2of5

COOP 2 of 5

daft

Custom 4 state symbology

databarexpanded

GS1 DataBar Expanded

databarexpandedcomposite

GS1 DataBar Expanded Composite

databarexpandedstacked

GS1 DataBar Expanded Stacked

databarexpandedstackedcomposite

GS1 DataBar Expanded Stacked Composite

databarlimited

GS1 DataBar Limited

databarlimitedcomposite

GS1 DataBar Limited Composite

databaromni

GS1 DataBar Omnidirectional

databaromnicomposite

GS1 DataBar Omnidirectional Composite

databarstacked

GS1 DataBar Stacked

databarstackedcomposite

GS1 DataBar Stacked Composite

databarstackedomni

GS1 DataBar Stacked Omnidirectional

databarstackedomnicomposite

GS1 DataBar Stacked Omnidirectional Composite

databartruncated

GS1 DataBar Truncated

databartruncatedcomposite

GS1 DataBar Truncated Composite

datalogic2of5

Datalogic 2 of 5

datamatrix

Data Matrix

datamatrixrectangular

Data Matrix Rectangular

datamatrixrectangularextension

Data Matrix Rectangular Extension

dotcode

DotCode

ean13

EAN-13

ean13composite

EAN-13 Composite

ean14

GS1-14

ean2

EAN-2 (2 digit addon)

ean5

EAN-5 (5 digit addon)

ean8

EAN-8

ean8composite

EAN-8 Composite

flattermarken

Flattermarken

gs1-128

GS1-128

gs1-128composite

GS1-128 Composite

gs1-cc

GS1 Composite 2D Component

gs1datamatrix

GS1 Data Matrix

gs1datamatrixrectangular

GS1 Data Matrix Rectangular

gs1dldatamatrix

GS1 Digital Link Data Matrix

gs1dlqrcode

GS1 Digital Link QR Code

gs1dotcode

GS1 DotCode

gs1northamericancoupon

GS1 North American Coupon

gs1qrcode

GS1 QR Code

hanxin

Han Xin Code

hibcazteccode

HIBC Aztec Code

hibccodablockf

HIBC Codablock F

hibccode128

HIBC Code 128

hibccode39

HIBC Code 39

hibcdatamatrix

HIBC Data Matrix

hibcdatamatrixrectangular

HIBC Data Matrix Rectangular

hibcmicropdf417

HIBC MicroPDF417

hibcpdf417

HIBC PDF417

hibcqrcode

HIBC QR Code

iata2of5

IATA 2 of 5

identcode

Deutsche Post Identcode

industrial2of5

Industrial 2 of 5

interleaved2of5

Interleaved 2 of 5 (ITF)

isbn

ISBN

ismn

ISMN

issn

ISSN

itf14

ITF-14

japanpost

Japan Post 4 State Customer Code

kix

Royal Dutch TPG Post KIX

leitcode

Deutsche Post Leitcode

mailmark

Royal Mail Mailmark

mands

Marks & Spencer

matrix2of5

Matrix 2 of 5

maxicode

MaxiCode

micropdf417

MicroPDF417

microqrcode

Micro QR Code

msi

MSI Modified Plessey

onecode

USPS Intelligent Mail

pdf417

PDF417

pdf417compact

Compact PDF417

pharmacode

Pharmaceutical Binary Code

pharmacode2

Two-track Pharmacode

planet

USPS PLANET

plessey

Plessey UK

posicode

PosiCode

postnet

USPS POSTNET

pzn

Pharmazentralnummer (PZN)

qrcode

QR Code

rationalizedCodabar

Codabar

raw

Custom 1D symbology

rectangularmicroqrcode

Rectangular Micro QR Code

royalmail

Royal Mail 4 State Customer Code

sscc18

SSCC-18

swissqrcode

Swiss QR Code

symbol

Miscellaneous symbols

telepen

Telepen

telepennumeric

Telepen Numeric

ultracode

Ultracode

upca

UPC-A

upcacomposite

UPC-A Composite

upce

UPC-E

upcecomposite

UPC-E Composite

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.