DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: tollwerk Open Device Lab

Author:Christopher
Created:2010-12-18T19:57:23
Changed:2013-06-04T19:06:50.550000000
Classification:tw_odl
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) ----
Keywords:Open Device Lab, odl, tcpdf, wallpaper, json, jsonp, forAdministrators, forDevelopers, forIntermediates, forAdvanced
Author:Dipl.-Ing. Joschi Kuphal
Email:joschi@tollwerk.de
Language:en

img-1 img-2 EXT: tollwerk Open Device Lab

Extension Key: tw_odl

Language: en

Version: 0.2.0

Keywords: Open Device Lab, odl, tcpdf, wallpaper, json, jsonp, forAdministrators, forDevelopers, forIntermediates, forAdvanced

Copyright © 2013 Dipl.-Ing. Joschi Kuphal, <joschi@tollwerk.de>

This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3 – a GNU/GPL CMS/Framework available from www.typo3.org.

In case you are reading this manual online at the TYPO3 website, we strongly recommend that you also visit the TYPO3 Extensions & Manuals page respectively the page about the tollwerk Open Device Lab TYPO3-Extension at our own website. We provide a PDF version of this manual there, which probably renders more nicely than the online version on typo3.org. (Sorry for our website currently being available in German language only. However, the PDF extension manuals are in English of course.)

Table of Contents

`EXT: tollwerk Open Device Lab 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__3940_1779390776>`_

What does it do? 3

Screenshots 4

`Installation 6 <#__RefHeading__467_413120346>`_

Static TypoScript 6

`Configuration 7 <#__RefHeading__3489_611069657>`_

Constants 7

Setup 9

`Usage 11 <#__RefHeading__5145_611069657>`_

Device management 11

Placing a device list in the frontend 12

Printing device labels 13

Generating device wallpapers 14

JSON / JSONP API 16

`Advanced techniques 17 <#__RefHeading__5157_611069657>`_

Creating a custom device label template 17

TCPDF view helpers 19

`Known problems 23 <#__RefHeading__5548_611069657>`_

`To-Do list 24 <#__RefHeading__5550_611069657>`_

`ChangeLog 25 <#__RefHeading__5552_611069657>`_

Introduction

What does it do?

Let's use the words of opendevicelab.com to introduce the big idea behind Open Device Labs:

Open Device Labs (ODLs, #ODL) are a grass roots community movement. They establish shared community pools of internet connected devices for testing purposes of web and app developers. In result, ODLs lead to an ultimate improvement of the web & app experience both for developers and for consumers. Since early 2012 there are lots of Open Device Labs evolving all over

the world, most of them running their own, mostly small website, while opendevicelab.com and lab-up.org being something like the “big umbrella” above it all.

This extension would like to be of use for anyone running an ODL website with the help TYPO3. It provides some features that might come handy, like e.g.:

The extension was written for TYPO3 version 6+ (no support for 4.x!) and is based on extbase / fluid.

Screenshots

The frontend plugin renders a list of registered ODL devices. It's based on a fluid template and can be tailored to your individual needs.

img-3 The backend provides a dedicated module for label printing and wallpaper image creation.

img-4 Installation ------------

To install the extension simply download it from the TYPO3 extension repository and enable it in the Extension Manager. There's nothing to configure in the Extension Manager.

Static TypoScript

Include the extension's static TypoScript into the TypoScript root template of your site.

img-5 Configuration -------------

Constants

Most of the extension's features can be controlled via the constant editor (e.g. on the TypoScript root template). Almost any constant directly relates to a corresponding setup option that can also be set by manually crafted TypoScript. Please see the setup chapter for details on these options.

There are separate constant editor sections for the frontend plugin and the backend module. The frontend plugin parameters mainly consist of the usual settings for extbase extensions like root paths and the storage folder. Additionally you can disable the extension's JSONP API here.

img-6

The backend module constants feature additional parameters for specifying a device identifier , the root path for print label templates as well as the (publicly accessible) folder for device wallpapers .

img-7 Setup ^^^^^

Frontend plugin setup

There are several TypoScript setup options controlling the behavior of the frontend plugin:

view.templateRootPath

Property

view.templateRootPath

Data type

dir

Description

Root path for the fluid templates of the plugin. The plugin has just one controller (named “Device”) with two actions (named “list” and “jsonp”, where the latter is a special action that doesn't require a fluid template). Accordingly there has to be one fluid template at the following location (relative to the template root path):

Device/List.html

Default

{$plugin.tx_twodl.view.templateRootPath}

view.partialRootPath

Property

view.partialRootPath

Data type

dir

Description

Root path for the fluid partials of the plugin (not used by default)

Default

{$plugin.tx_twodl.view.partialRootPath}

view.layoutRootPath

Property

view.layoutRootPath

Data type

dir

Description

Root path for the fluid layouts of the plugin (not used by default)

Default

{$plugin.tx_twodl.view.layoutRootPath}

persistence.storagePid

Property

persistence.storagePid

Data type

dir

Description

ID of the storage page containing the device and auxiliary records that should be shown in the frontend list

Default

{$plugin.tx_twodl.persistence.storagePid}

settings.deviceIdentifier

Property

settings.deviceIdentifier

Data type

string

Description

Pattern for device identifiers . This one is identical to the corresponding backend module setting and get's inherited from there by default (see below for a description).

Default

{$module.tx_twodl.settings.deviceIdentifier}

settings.deviceNumberDigits

Property

settings.deviceNumberDigits

Data type

integer

Description

Total digits of device numbers . This one is identical to the corresponding backend module setting and get's inherited from there by default (see below for a description).

Default

{$module.tx_twodl.settings.deviceNumberDigits}

[tsref:plugin.tx_twodl]

Backend module setup

There are several TypoScript setup options controlling the behavior of the backend module:

view.templateRootPath

Property

view.templateRootPath

Data type

dir

Description

Root path for the fluid templates of the model. The module has just one controller (named “Odl”) with three actions (named “labels”, “print” and “wallpaper”). Accordingly there have to be three fluid templates at the following locations (relative to the template root path):

  • Odl/Labels.html
  • Odl/Print.html
  • Odl/Wallpapers.html

You are not supposed to change this setting.

Default

{$module.tx_twodl.view.templateRootPath}

view.partialRootPath

Property

view.partialRootPath

Data type

dir

Description

Root path for the fluid partials of the module (not used by default)

Default

{$module.tx_twodl.view.partialRootPath}

view.layoutRootPath

Property

view.layoutRootPath

Data type

dir

Description

Root path for the fluid layouts of the module. You are not supposed to change this setting.

Default

{$module.tx_twodl.view.layoutRootPath}

settings.labelTemplateRootPath

Property

settings.labelTemplateRootPath

Data type

dir

Description

Root path for print label templates . Templates for rendering print labels are supposed to be fluid templates with usage of special TCPDF view helpers .

Default

{$plugin.tx_twodl.persistence.storagePid}

settings.wallpaperRootPath

Property

settings.wallpaperRootPath

Data type

dir

Description

Root path for device wallpaper images . Wallpapers are generated through the backend module and supposed to be publicly accessible for ease of installation on particular devices (reachable with regular web browsers), so make sure to enter an existing webserver directory here (relative to site root).

Default

{$module.tx_twodl.settings.wallpaperRootPath}

settings.deviceIdentifier

Property

settings.deviceIdentifier

Data type

string

Description

Pattern for device identifiers . Each device will have a unique identifier, consisting of a device number (see below) and potentially some more letters or symbols. The (padded) device number will be substituted into this pattern via the PHP function sprintf , so make sure to include %s as marker in the pattern.

Default

{$module.tx_twodl.settings.deviceIdentifier}

settings.deviceNumberDigits

Property

settings.deviceNumberDigits

Data type

integer

Description

Total digits of device numbers . A device's number will be built by left-padding it's uid with the appropriate number of zeros. The padded device number will e.g. be used for the device identifiers (see above).

Default

{$module.tx_twodl.settings.deviceNumberDigits}

settings.wallpaper

Property

settings.wallpaper

Data type

GIFBUILDER

Description

TypoScript configuration for the rendering of device wallpaper images . This configuration will be used for the processing of a GIFBUILDER object and may contain some special device specific markers that will become substituted prior to the rendering process:

  • ###DEVICEWIDTH### : Device screen width as given in the device record
  • ###DEVICEHEIGHT### : Device screen height as given in the device record
  • ###DEVICEHOMEWIDTH### : Device wallpaper width as given in the device record
  • ###DEVICEHOMEHEIGHT### : Device wallpaper height as given in the device record
  • ###DEVICEPPCM### : Device screen density in pixels per centimeter as given in the device record
  • ###DEVICEPPI### : Device screen density in pixels per inch as given in the device record
  • ###DEVICENUMBER### : Padded device number (see above)
  • ###DEVICEIDENTIFIER### : Device identifier (see above)

Default

See EXT:tw_odl/Configuration/TypoScript/setup.txt

[tsref:module.tx_twodl]

Usage

Device management

The extension introduces a couple of record types associated with the management of ODL devices. These are:

  • Devices
  • Manufacturers
  • Operating systems
  • Operating system versions
  • Web browsers
  • Web browser versions
  • CSS screen resolutions
  • Contributors

The central record type is – of course – the device , whereas the other record types serve as auxiliary records. Each device has

  • one manufacturer,
  • one operating system (with an optional version),
  • one or more web browsers installed (each with an optional version),
  • one or two CSS screen resolutions (they might differ from the physical screen resolution and might also be different in landscape and portrait orientation)
  • and one contributor.

It is suggested that you create and manage the auxiliary records explicitly instead of creating them from within a device form. While the necessary wizards are included in the forms TYPO3's support for them is somewhat limited. Most importantly all the associated records (including the devices) have to be contained on one single page in the page tree.

The single properties of the different record types in the backend forms should be pretty self explanatory. Most of the properties are also being exported through the JSON / JSONP API as well, so it might be a good idea to study a JSON export result for further understanding.

Placing a device list in the frontend

To place a device list on a frontend page simply select the “ODL Device List” plugin from the “New content element” wizard:

img-8 The content element created should feature the plugin type “ODL Device List”:

img-9 Printing device labels ^^^^^^^^^^^^^^^^^^^^^^

The extension provides a backend module which you can use for generating and printing device labels. You could use such labels e.g. for labeling your device display or your devices themselves. Labels are created as PDF files, as directly printing from the browser would potentially result in header and footer lines be printed as well.

Please select the Web > Open Device Lab module to the left as well as a page carrying device and auxiliary records in the page tree to print labels for those devices.

img-10 There are two exemplary label templates coming with the extension, one for using a label sticker sheet with multiple columns and rows of labels (“AVERY Zweckform 3666”) and another one for printing labels on endless paper with a dedicated label printer (“Endless paper”). The label templates are built with fluid (don't get confused by the “.pdf” file extension they carry, they're just ordinary XML) residing in the directory specified by the settings.wallpaperRootPath TypoScript parameter.

PDF generation itself is done via the freely available TCPDF library ( http://www.tcpdf.org ). The extension includes an unburdened version of TCPDF (essentially the examples and fonts have been stripped out in favor of significantly smaller file size). The extension comes with a couple of specialized view helpers for controlling TCPDF output . You can easily use your own label templates (or customize one of the default ones) by dropping appropriate fluid template files (with “.pdf” file extension) into the label template root directory.

Generating device wallpapers

As it might be desirable to give your devices an all-over consistent appearance the extension provides a backend module which you can use for generating wallpaper images for your devices. Please select the Web > Open Device Lab module to the left as well as a page carrying device and auxiliary records in the page tree to generate wallpapers for those devices.

img-11 The wallpaper images are rendered by means of regular TYPO3 frontend content element rendering using a GUIBUILDER TypoScript configuration which can be customized via the settings.wallpaper parameter. There are some custom markers you may use within the wallpaper configuration – see the TypoScript settings documentation for details. Most importantly, each wallpaper will be rendered in the dimensions defined by the corresponding device record (wallpaper width and height settings). Examples of wallpapers might e.g. look like:

Apple iPad 2 wallpaper

img-12 Apple MacBook Pro wallpaper

img-13

In many cases the easiest way of transferring a wallpaper to a mobile device is by retrieving and saving it with a regular web browser.In many cases the easiest way of transferring a wallpaper to a mobile device is by retrieving and saving it with a regular web browser. To accomplish this the extension generates the wallpaper images to a publicly accessible directory somewhere below your website root (by default into the directory typo3temp/odl-wallpapers – configure it via the settings.wallpaperRootPath TypoScript setting). Once generated the path to each device's wallpaper is shown in the backend module's device list. You can click on each wallpaper to open it in a separate browser window. To retrieve the wallpaper on your device simply browse to the URL shown in the address bar.

JSON / JSONP API

By default the extension exposes the registered devices through a JSON / JSONP API (you might disable this via the constant editor). You may query the API by requesting the TYPO3 frontend with a type parameter of value 1333:

http://your-device-lab.org/index.php?type=1333

The idea behind the JSON API is very well explained by Andre Jay Meissner ( http://opendevicelab.com / http://lab-up.org ) in response to a blog post of Africa's Nomad Device Lab : At some point in the future opendevicelab.com might start grabbing device lab data by pulling JSON files from the ODL's websites. Currently no such feature exists yet, but already having prepared a JSON API simply feels good, don't you think?

The export structure used right now is somewhat fictional and might lack certain information (e.g. the device lab residential data), but as soon as opendevicelab.com announces a standard to be used we will adapt the output. This is a current output example (excerpt):

[
   {
      "manufacturer":"Apple",
      "name":"iPad 1",
      "model":"MB292FD",
      "os":"iOS",
      "osversion":"5.1.1",
      "width":768,
      "height":1024,
      "diagonal":9.7,
      "ppcm":52,
      "ppi":132,
      "inputmethods":[
         "touchscreen"
      ],
      "resolutions":[
         {
            "width":768,
            "height":1024,
            "ratio":1,
            "orientation":3
         }
      ],
      "comment":"",
      "contributor":{
         "name":"tollwerk GmbH",
         "logo":"tollwerk-logo.png",
         "url":"tollwerk.de"
      },
      "available":1
   },
   ...
]

Use one of the GET parameters callback or jsonp to specifiy the callback function that should be used for padding the JSON data (otherwise you will get a simple JSON array as result). Example:

http://your-device- lab.org/index.php?type=1333&callback=myCallbackFunction

Advanced techniques

Creating a custom device label template

The fluid templates used for device label printing reside in the directory specified by the settings.labelTemplateRootPath TypoScript parameter and have to carry a “.pdf” file extension in order to be listed in the backend module (although they have ordinary XML content). Internally they make use of some special TCPDF view helpers documented below. One of the default label templates has the following content:

{namespace odl=Tollwerk\TwOdl\ViewHelpers}
<odl:tcpdf width="210" height="297" unit="mm" left="9.75" right="9.75"
    top="10.63" bottom="10.63" columns="5" rows="13" offset="{offset}">
    <odl:tcpdf.font family="DroidSans"
        fontfile="fileadmin/templates/fonts/DroidSans/DroidSans.ttf"/>
    <odl:tcpdf.font family="DroidSans"
        fontfile="fileadmin/templates/fonts/DroidSans/DroidSans-Bold.ttf"
        style="b"/>
    <f:for each="{devices}" as="device">
        <odl:tcpdf.label>
            <odl:tcpdf.image
                file="EXT:tw_odl/Resources/Public/Images/odl-nbg-hor-de-white.eps"
                width="20" top="2" left="2" right="2" align="left"/>
            <odl:tcpdf.text x="22" y="0.5" width="15.5" halign="right"
                fontfamily="DroidSans" fontstyle="b"
                fontcolor="{0:0, 1:116, 2:148}" fontsize="18">
                <odl:deviceIdentifier device="{device}" identifier="%s"
                    digits="{settings.deviceNumberDigits}"/>
            </odl:tcpdf.text>
            <odl:tcpdf.text x="1" y="9" width="10" height="2.5"
                fontfamily="DroidSans" fontsize="4" valign="bottom">
                <f:translate key="device.name"/>
            </odl:tcpdf.text>
            <odl:tcpdf.text x="10" width="27" height="3" fontfamily="DroidSans"
                fontsize="6" fontstyle="b" cursor="1" halign="right"
                >{device.manufacturer.name} {device.name}</odl:tcpdf.text>
            <odl:tcpdf.text x="1" width="10" height="2.5" fontfamily="DroidSans"
                fontsize="4" valign="bottom">
                <f:translate key="device.os"/>
            </odl:tcpdf.text>
            <odl:tcpdf.text x="10" width="27" height="3" fontfamily="DroidSans"
                fontsize="6" fontstyle="b" cursor="1" halign="right"
                >{device.os.name} {device.osversion.version}</odl:tcpdf.text>
            <odl:tcpdf.text x="1" width="10" height="2.5" fontfamily="DroidSans"
                fontsize="4" valign="bottom">
                <f:translate key="device.contributor"/>
            </odl:tcpdf.text>
            <odl:tcpdf.text x="10" width="27" height="6" fontfamily="DroidSans"
                fontsize="6" fontstyle="b" halign="right"
                >{device.contributor.name}</odl:tcpdf.text>
        </odl:tcpdf.label>
    </f:for>
</odl:tcpdf>

As you see there is no HTML, just TCPDF specific markup using fluid syntax and the TCPDF view helpers . One could describe the template with the following words:

On the top level a target medium is specified (in this case a DIN A4 sheet with 5 label columns and 13 label rows) using the odl:tcpdf view helper. Next, two custom fonts (Droid Sans) get declared via the odl:tcpdf.font view helper. Then, for each device in the list a label is created with the odl:tcpdf.label view helper, each consisting of an image ( odl:tcpdf.image ) and several text cells ( odl:tcpdf.text ). The PDF output of the template looks like this:

img-14 By studying the example template as well as the view helper documentation below you should easily be able to write your own custom label template.

TCPDF view helpers

The extension comes with a couple of custom view helpers that you can use in your fluid label templates. If you want to do so, you have to register the appropriate view helper namespace in the beginning of your templates like this:

{namespace odl=Tollwerk\TwOdl\ViewHelpers}
odl:tcpdf

This view helper initializes TCPDF rendering and sets a target medium. It always has to be the outermost element in a label template. Example:

<odl:tcpdf width="210" height="297" unit="mm" left="9.75" right="9.75" top="10.63" bottom="10.63" columns="5" rows="13" offset="{offset}">
    ...
</odl:tcpdf>

The possible arguments are as follows:

width

Attribute

width

Data type

float

Description

Page width in user units (see below). This is the only mandatory attribute.

Default

height

Attribute

height

Data type

float

Description

Page height (not present = endless paper).

Default

unit

Attribute

unit

Data type

string

Description

User defined measurement unit for pretty much everything (except font sizes).

Default

mm

rows

Attribute

rows

Data type

integer

Description

Number of label rows .

Default

columns

Attribute

columns

Data type

integer

Description

Number of label columns .

Default

1

top

Attribute

top

Data type

float

Description

Top margin (vertical distance between page border and first label).

Default

0

bottom

Attribute

bottom

Data type

float

Description

Bottom margin (vertical distance between page border and last label).

Default

0

left

Attribute

left

Data type

float

Description

Left margin (horizontal distance between page border and first label).

Default

0

spacing

Attribute

spacing

Data type

float

Description

General label spacing (horizontal and vertical distance between all labels).

Default

0

labelheight

Attribute

labelheight

Data type

float

Description

Height of a single label (necessary only if no page height is given = endless paper).

Default

10

borderwidth

Attribute

borderwidth

Data type

float

Description

Label border width (0 = no border).

Default

0

bordercolor

Attribute

bordercolor

Data type

array

Description

Label border color , given as fluid array of RGB values.

Default

{0: 0, 1: 0, 2:0}

(= black)

offset

Attribute

offset

Data type

integer

Description

Number of blank labels at the beginning of the first page. This setting is only useful width non-endless target media (and will be ignored otherwise) when printing on a partially used sticker sheet.

Default

0

fontsize

Attribute

fontsize

Data type

float

Description

Default font size (may be overridden by single text cells).

Default

11

odl:tcpdf.font

This view helper registers a TrueType font file for use with a template. Technically it doesn't matter where you put it in your template, as long as it's a descendant of the odl:tcpdf view helper. However, we suggest you to put it in the beginning. Example:

<odl:tcpdf.font family="DroidSans" fontfile="fileadmin/templates/fonts/DroidSans/DroidSans.ttf"/>

The possible arguments are as follows:

family

Attribute

family

Data type

string

Description

Font family name . This is the name you have to use with the odl:tcpdf.text view helper afterwards.

Default

fontfile

Attribute

fontfile

Data type

string

Description

TrueType font file . You may give a relative path here (as measured from the site root), an absolute path or a path prefixed with “EXT:my_extension”.

TCPDF creates an intermediate font definition file for each TrueType font. These definition files are put into the directory typo3temp /tcpdf-fonts . Please make sure that the webserver has write access to this directory.

Default

style

Attribute

style

Data type

string

Description

The font style you would like to associate with the file given font file. May be one of

  • B (for bold)
  • I (for italic)
  • U (for underline)
  • D (for line through)
  • O (for overline)

or an arbitrary combination / concatenation of these letters. An empty string means “regular” (default).

Default

odl:tcpdf.image

This view helper renders an image to the current label. Example:

<odl:tcpdf.image file="EXT:tw_odl/Resources/Public/Images/odl-nbg-hor-de-white.eps" width="20" top="2" left="2" right="2" align="left"/>

The possible arguments are as follows:

file

Attribute

file

Data type

string

Description

Image file . You may give a relative path here (as measured from the site root), an absolute path or a path prefixed with “EXT:my_extension”. You may use the usual image file formats (JPEG, GIF, PNG) as well as Illustrator files (AI, EPS).

Default

halign

Attribute

halign

Data type

string

Description

Horizontal alignment within the label. Valid values are

  • L: Left
  • C: Center
  • R: Right

Default

L

width

Attribute

width

Data type

float

Description

Image width in measurement units. Zero means “original size” respectively “autocalculate” if height is greater than zero.

Default

0

height

Attribute

height

Data type

float

Description

Image height in measurement units. Zero means “original size” respectively “autocalculate” if width is greater than zero.

Default

0

top

Attribute

top

Data type

float

Description

Top margin within the label (in measurement units).

Default

0

left

Attribute

left

Data type

float

Description

Left margin within the label (in measurement units). Only used if the image is left aligned.

Default

0

right

Attribute

right

Data type

float

Description

Right margin within the label (in measurement units). Only used if the image is right aligned.

Default

0

odl:tcpdf.label

This view helper denotes a single device label. Technically it is not necessary that the view helper encloses the text and image elements on the label, but for semantic reasons we suggest you to do so. Example:

<odl:tcpdf.label>
    ...
</odl:tcpdf.label>

The view helper has no arguments.

odl:tcpdf.page

This view helper denotes a page of device labels respectively enforces a page break. Technically it is not necessary that the view helper encloses the contained labels, but for semantic reasons we suggest you to do so. If you do not need to explicitly force page breaks you don't have to use this view helper at all. Example:

<odl:tcpdf.page>
    ...
</odl:tcpdf.page>

The view helper has no arguments.

odl:tcpdf.text

This view helper renders a text cell to the current label. Example:

<odl:tcpdf.text x="10" width="27" height="3" fontfamily="DroidSans" fontsize="6" fontstyle="b" cursor="1" halign="right">{device.manufacturer.name} {device.name}</odl:tcpdf.text>

The possible arguments are as follows:

text

Attribute

text

Data type

string

Description

This argument is optional and denotes the text to be printed on the label. You may also give the text as children of the view helper element (which seems more semantic).

Default

width

Attribute

width

Data type

float

Description

The width of the text cell (in measurement units). Zero means automatic width (within the label dimensions).

Default

0

height

Attribute

height

Data type

float

Description

The height of the text cell (in measurement units). Zero means automatic width (within the label dimensions).

Default

0

x

Attribute

x

Data type

float

Description

The horizontal position of the text cell (in measurement units) within the current label. If this argument is not given, the text cell will be inserted at the current horizontal insertion point position (depending on your last insertion).

Default

y

Attribute

y

Data type

float

Description

The vertical position of the text cell (in measurement units) within the current label. If this argument is not given, the text cell will be inserted at the current vertical insertion point position (depending on your last insertion).

Default

halign

Attribute

halign

Data type

string

Description

Horizontal alignment within the label. Valid values are

  • L: Left
  • C: Center
  • R: Right

Default

L

valign

Attribute

valign

Data type

string

Description

Vertical alignment within the label. Valid values are

  • T: Top
  • C: Center
  • R: Right

Not sure if this argument works right now ...

Default

T

fontfamily

Attribute

fontfamily

Data type

string

Description

The font family the text is to be rendered with. This has to be either a custom defined font family (see odl:tcpdf.font view helper) or one of the predefined fonts:

  • courier : Courier
  • courierB : Courier Bold
  • courierBI : Courier Bold Italic
  • courierI : Courier Italic
  • helvetica : Helvetica
  • helveticaB : Helvetica Bold
  • helveticaBI : Helvetica Bold Italic
  • helveticaI : Helvetica Italic
  • symbol : Symbol
  • times : Times New Roman
  • timesB : Times New Roman Bold
  • timesBI : Times New Roman Bold Italic
  • timesI : Times New Roman Italic
  • zapfdingbats : Zapf Dingbats

Default

times

fontstyle

Attribute

fontstyle

Data type

string

Description

The font style used for the text cell. May be one of

  • B (for bold)
  • I (for italic)
  • U (for underline)
  • D (for line through)
  • O (for overline)

or an arbitrary combination / concatenation of these letters. An empty string means “regular” (default).

Default

fontsize

Attribute

fontsize

Data type

float

Description

Font size (in points) to be used.

Default

See fontsize argument of the odl:tcpdf view helper

fontcolor

Attribute

fontcolor

Data type

array

Description

Font color , given as fluid array of RGB values.

Default

{0: 0, 1: 0, 2:0}

(= black)

cursor

Attribute

cursor

Data type

integer

Description

Cursor position after the insertion of the text cell:

  • 0: Top / right to the text cell
  • 1: Beginning of next line
  • 2: Below the text cell

Default

0

Known problems

There are no known problems right now. Please report any problems to the author .

To-Do list

Future improvements could include:

Implementation of a JSON API format in conformance with the opendevicelab.com specifications (as soon as available)

If there's something else you think that might be useful for ODL webmasters then please let us know !

ChangeLog

0.20

Version

0.20

Changes

Language label and example template additions; Added backend fields for browser features and debugging options; Manual corrections

0.1.2

Version

0.1.2

Changes

Maintenance release; Added “connectivity” options to device records; manual corrections

0.1.1

Version

0.1.1

Changes

Manual corrections

0.1.0

Version

0.1.0

Changes

Initial public release to the TYPO3 Extension Repository