1. GroupDocs Cloud Documentation
  2. /
  3. GroupDocs.Assembly Cloud
  4. /
  5. Developer Guide
  6. /
  7. Working with Hyperlinks, Bookmarks, Checkboxes, Barcodes

Working with Hyperlinks, Bookmarks, Checkboxes, Barcodes

This section describes template tags used to generate and insert different types of elements, such as hyperlinks, bookmarks, checkboxes, barcodes, into reports dynamically.

You can insert hyperlinks to different types of documents: word-processing documents and emails, spreadsheet and presentation documents. The following subsections show some tag syntax differences applied to each document type.

You can insert links to bookmarks using the link tags. The syntax of a link tag is defined as follows:

<<link [reference][text]>>

Here, a mandatory reference parameter defines either an URI, which represents a hyperlink to an external resource, or the name of a Bookmark within the same document. If a reference represents the name of a bookmark, then the corresponding link navigates to the documents bookmark.

An optional text parameter can be omitted. In this case a text from the reference parameter is used by default.

Have a note that a link tag cannot be used within charts.

For spreadsheet documents, the behavior of link tags is different. Here, a reference parameter represents a Cell or a Cell Range.

Some common use-cases are shown in the following table:

DescriptionFormatExample
Local reference to a CellcellNameB11
Reference to a Cell within another WorksheetworksheetName!cellNameSheet2!A1
Local reference to a Cell RangestartCellName:endCellNameB3:B7
Reference to a Cell Range within another WorksheetworksheetName!startCellName:endCellNameSheet3!A2:C2

For Presentation documents, the behavior of link tags is also different. Here, a reference parameter represents a reference to a slide within the same presentation, defined by a “SlideN” string, where N is a slide number.

The following example demonstrates how to insert a link to a second slide of a presentation:

<<link ["Slide2"] ["A reference to a second slide"]>>

Inserting a Bookmark

You can insert bookmarks to your Word-processing documents and emails using bookmark tags. The syntax of a bookmark tag is defined as follows:

<<bookmark [bookmarkName]>>content<</bookmark>>

Here, a mandatory bookmarkName parameter defines the name of a bookmark to be inserted.

Setting Checkbox Values

You can set a Checkbox state to either checked or unchecked in your Word-based documents by taking the following steps:

  1. Add a Checkbox content control to your document template.
  2. By editing content properties of a Checkbox control, add a check tag to its title using the following syntax:
<<check [condition]>>

Here, a mandatory condition parameter of a boolean type, defines a condition upon which the value of the Checkbox is set to checked state.

Generating and Inserting a Barcode Image

You can generate and insert barcode images to your documents using a barcode tag. To declare a dynamically generated barcode image within your template, perform the following steps:

  • Add a Textbox to your template at the required place.
  • Set standard settings for the textbox.
  • Specify a barcode tag within this textbox using the following syntax:
<<barcode [barcodeText] -barcodeType>>

Font settings that are used to render barcode image, including font name, size, style and color, are derived from the font setting of the corresponding barcode tag. Similarly, the barcode text alignment options are derived from the tag’s text alignment options. The background color of the barcode image is derived from the solid fill of the textbox containing the tag.

You can scale barcode symbols of a barcode image specifying the scale attribute as follows:

<<barcode [barcodeText] -barcodeType scale="scalingFactor">>

A scale attribute affects the width and height of a 2D barcode symbol and the width of a linear barcode symbol. The scalingFactor value represents the percentage of barcode symbol scaling.

You can also set the height of a barcode image applying the barHeight attribute as follows:

<<barcode [barcodeText] -barcodeType barHeight="height">>

The height value specifies the percentage of the overall barcode image height.

For example, to set the height of a barcode symbol equal to two-thirds of its overall barcode image height, you can use the following barcode tag:

<<barcode ["30734690"] -codabar barHeight="67">>

Setting a Barcode Type

You can specify a barcode type with a switch within a barcode tag declaration.

The following example shows how you can dynamically generate a barcode image of a CODABAR type:

<<barcode ["736192"] -codabar>>

The result would look like as follows:

The Barcode Image Example

A list of supported barcode types is presented below:

Barcode TypeDescription
codabarCODABAR Barcode
code11CODE 11 barcode
code39SStandard CODE 39 barcode
code39EExtended CODE 39 barcode
code93SStandard CODE 93 barcode
code93EExtended CODE 93 barcode
code128CODE 128 barcode
code128GS1GS1 CODE 128 barcode specification. The barcode text must contain parentheses for A
ean8EAN-8 barcode
ean13EAN-13 barcode
ean14EAN-14 barcode
scc14SCC-14 barcode
sscc18SSCC-18 barcode
upcaUPC-A barcode
upceUPC-E barcode
isbnISBN barcode
issnISSN barcode
ismnISMN barcode
stfStandard 2 of 5 barcode
itfInterleaved 2 of 5 barcode
mtfMatrix 2 of 5 barcode
ip25Italian Post 25 barcode
iatatfIATA 2 of 5 barcode. IATA (International Air Transport Assosiation) uses this barcode for the management of air cargo
itf14ITF14 barcode
itf6ITF-6 barcode
msiMSI Plessey barcode
vinVIN (Vehicle Identification Number) barcode
dpiDeutschen Post barcode, also known as Identcode, CodeIdentcode, German Postal 2 of 5 Identcode, Deutsche Post AG Identcode, Deutsche Frachtpost Identcode, Deutsche Post AG (DHL)
dplDeutsche Post Leitcode barcode, also known as German Postal 2 of 5 Leitcode, CodeLeitcode, Leitcode, Deutsche Post AG (DHL)
opcOPC (Optical Product Code) barcode, also known as VCA barcode, VCA OPC, Vision Council of America OPC barcode
pznPZN barcode, also known as Pharma Zentral Nummer, Pharmazentralnummer
code16KCode 16K barcode
pharmacodeRepresents Pharmacode barcode, also known as Code32
dmDataMatrix barcode
qrQR Code barcode
aztecAztec barcode
pdf417Pdf417 barcode
macroPdf417MacroPdf417 barcode
dmGS1DataMatrix barcode with GS1 string format
microPdf417MicroPdf417 barcode
qrGS1QR barcode with GS1 string format
maxiCodeMaxiCode barcode
dotCodeDotCode barcode
apAustralia Post Customer barcode
postnetPostnet barcode
planetPlanet barcode
oneCodeUSPS OneCode barcode
rm4sccRM4SCC barcode. RM4SCC (Royal Mail 4-state Customer Code) is used for automated mail sort process in UK
databarODDatabar omni-directional barcode
databarTDatabar truncated barcode
databarLDatabar limited barcode
databarEDatabar expanded barcode
databarESDatabar expanded stacked barcode
databarSDatabar stacked barcode
databarSODDatabar stacked omni-directional barcode
spSingapore Post barcode
apeAustralian Post Domestic eParcel barcode
sppSwiss Post Parcel barcode. Supported types: Domestic Mail, International Mail, Additional Services
patchCodePatch code barcode
code32Code32 barcode
dltfDataLogic 2 of 5 barcode
dkixDutch KIX barcode
codablockFCodablock F barcode
codablockFGS1GS1 Codablock F barcode