.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ============================= 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: |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, 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: Table of Contents ----------------- **`EXT: tollwerk Open Device Lab 1 <#__RefHeading__5708_1738894311>`_** **`Introduction 3 <#__RefHeading__3940_1779390776>`_** `What does it do? 3 <#__RefHeading__3942_1779390776>`_ `Screenshots 4 <#__RefHeading__4557_1779390776>`_ **`Installation 6 <#__RefHeading__467_413120346>`_** `Static TypoScript 6 <#__RefHeading__3487_611069657>`_ **`Configuration 7 <#__RefHeading__3489_611069657>`_** `Constants 7 <#__RefHeading__5389_1779390776>`_ `Setup 9 <#__RefHeading__3625_611069657>`_ **`Usage 11 <#__RefHeading__5145_611069657>`_** `Device management 11 <#__RefHeading__5086_318403446>`_ `Placing a device list in the frontend 12 <#__RefHeading__2783_1779390776>`_ `Printing device labels 13 <#__RefHeading__5155_611069657>`_ `Generating device wallpapers 14 <#__RefHeading__5090_318403446>`_ `JSON / JSONP API 16 <#__RefHeading__4144_1858959187>`_ **`Advanced techniques 17 <#__RefHeading__5157_611069657>`_** `Creating a custom device label template 17 <#__RefHeading__5159_611069657>`_ `TCPDF view helpers 19 <#__RefHeading__5161_611069657>`_ **`Known problems 23 <#__RefHeading__5548_611069657>`_** **`To-Do list 24 <#__RefHeading__5550_611069657>`_** **`ChangeLog 25 <#__RefHeading__5552_611069657>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: 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.: - Detailled device management including the rendering of a `frontend device list <#1.5.3.Placing%20a%20device%20list%20in%20the%20frontend|outline>`_ - Generation of multi-purpose `device labels <#1.5.5.Printing%20device%20labels|outline>`_ via PDF using TCPDF ( `http://www.tcpdf.org/ `_ ) - Creation of branded `device wallpaper images <#1.5.6.Generating%20device%20wallpapers|outline>`_ - `JSON / JSONP API <#1.5.7.JSON%20/%20JSONP%20API|outline>`_ for registered ODL devices The extension was written for TYPO3 version 6+ (no support for 4.x!) and is based on extbase / fluid. .. _Screenshots: 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: Static TypoScript ^^^^^^^^^^^^^^^^^ Include the extension's static TypoScript into the TypoScript root template of your site. |img-5| Configuration ------------- .. _Constants: 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 <#1.3.1.Setup|outline>`_ 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 <#1.4.5.JSON%20/%20JSONP%20API|outline>`_ here. |img-6| The backend module constants feature additional parameters for specifying a **device identifier** , the root path for `print label templates <#1.5.5.Printing%20device%20labels|outline>`_ as well as the (publicly accessible) folder for `device wallpapers <#1.5.6.Generating%20device%20wallpapers|outline>`_ . |img-7| Setup ^^^^^ .. _Frontend-plugin-setup: Frontend plugin setup """"""""""""""""""""" There are several TypoScript setup options controlling the behavior of the frontend plugin: .. ### BEGIN~OF~TABLE ### .. _view-templateRootPath: **view.templateRootPath** ~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: view.partialRootPath ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: view.layoutRootPath ~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **persistence.storagePid** ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property **persistence.storagePid** Data type dir Description ID of the storage page containing the `device and auxiliary records <#1.5.1.Device%20management|outline>`_ that should be shown in the frontend list Default {$plugin.tx\_twodl.persistence.storagePid} .. _settings-deviceIdentifier: **settings.deviceIdentifier** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **settings.deviceNumberDigits** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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} .. ###### END~OF~TABLE ###### [tsref:plugin.tx\_twodl] .. _Backend-module-setup: Backend module setup """""""""""""""""""" There are several TypoScript setup options controlling the behavior of the backend module: .. ### BEGIN~OF~TABLE ### .. _view-templateRootPath: **view.templateRootPath** ~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: view.partialRootPath ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: view.layoutRootPath ~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **settings.labelTemplateRootPath** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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 <#1.6.3.TCPDF%20view%20helpers|outline>`_ . Default {$plugin.tx\_twodl.persistence.storagePid} .. _settings-wallpaperRootPath: **settings.wallpaperRootPath** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **settings.deviceIdentifier** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **settings.deviceNumberDigits** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: **settings.wallpaper** ~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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 .. ###### END~OF~TABLE ###### [tsref:module.tx\_twodl] .. _Usage: Usage ----- .. _Device-management: 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 <#1.5.7.JSON%20/%20JSONP%20API|outline>`_ 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: 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 <#1.6.3.TCPDF%20view%20helpers|outline>`_ . 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: 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 <#1.4.2.2.Backend%20module%20setup|outline>`_ 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: 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: Advanced techniques ------------------- .. _Creating-a-custom-device-label-template: 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 <#1.6.3.TCPDF%20view%20helpers|outline>`_ documented below. One of the default label templates has the following content: :: {namespace odl=Tollwerk\TwOdl\ViewHelpers} {device.manufacturer.name} {device.name} {device.os.name} {device.osversion.version} {device.contributor.name} As you see there is no HTML, just TCPDF specific markup using fluid syntax and the `TCPDF view helpers <#1.6.3.TCPDF%20view%20helpers|outline>`_ . 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: 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: 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: :: ... The possible arguments are as follows: .. ### BEGIN~OF~TABLE ### .. _width: **width** ~~~~~~~~~ .. container:: table-row Attribute **width** Data type float Description **Page width** in user units (see below). This is the only mandatory attribute. Default .. _height: **height** ~~~~~~~~~~ .. container:: table-row Attribute **height** Data type float Description **Page height** (not present = endless paper). Default .. _unit: **unit** ~~~~~~~~ .. container:: table-row Attribute **unit** Data type string Description User defined **measurement unit** for pretty much everything (except font sizes). Default mm .. _rows: **rows** ~~~~~~~~ .. container:: table-row Attribute **rows** Data type integer Description Number of **label rows** . Default .. _columns: **columns** ~~~~~~~~~~~ .. container:: table-row Attribute **columns** Data type integer Description Number of **label columns** . Default 1 .. _top: **top** ~~~~~~~ .. container:: table-row Attribute **top** Data type float Description **Top margin** (vertical distance between page border and first label). Default 0 .. _bottom: **bottom** ~~~~~~~~~~ .. container:: table-row Attribute **bottom** Data type float Description **Bottom margin** (vertical distance between page border and last label). Default 0 .. _left: **left** ~~~~~~~~ .. container:: table-row Attribute **left** Data type float Description **Left margin** (horizontal distance between page border and first label). Default 0 .. _right: **right** ~~~~~~~~~ .. container:: table-row Attribute **right** Data type float Description **Right margin** ( horizontal distance between page border and last label). Default 0 .. _spacing: **spacing** ~~~~~~~~~~~ .. container:: table-row Attribute **spacing** Data type float Description General **label spacing** (horizontal and vertical distance between all labels). Default 0 .. _labelheight: **labelheight** ~~~~~~~~~~~~~~~ .. container:: table-row Attribute **labelheight** Data type float Description **Height of a single label** (necessary only if no page height is given = endless paper). Default 10 .. _borderwidth: **borderwidth** ~~~~~~~~~~~~~~~ .. container:: table-row Attribute **borderwidth** Data type float Description Label **border width** (0 = no border). Default 0 .. _bordercolor: **bordercolor** ~~~~~~~~~~~~~~~ .. container:: table-row 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: **offset** ~~~~~~~~~~ .. container:: table-row 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: **fontsize** ~~~~~~~~~~~~ .. container:: table-row Attribute **fontsize** Data type float Description Default **font size** (may be overridden by single text cells). Default 11 .. ###### END~OF~TABLE ###### .. _odl-tcpdf-font: 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: :: The possible arguments are as follows: .. ### BEGIN~OF~TABLE ### .. _family: **family** ~~~~~~~~~~ .. container:: table-row Attribute **family** Data type string Description **Font family name** . This is the name you have to use with the `odl:tcpdf.text <#1.6.3.6.odl:tcpdf.text|outline>`_ view helper afterwards. Default .. _fontfile: **fontfile** ~~~~~~~~~~~~ .. container:: table-row 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: **style** ~~~~~~~~~ .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _odl-tcpdf-image: odl:tcpdf.image """"""""""""""" This view helper renders an image to the current label. Example: :: The possible arguments are as follows: .. ### BEGIN~OF~TABLE ### .. _file: **file** ~~~~~~~~ .. container:: table-row 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: **halign** ~~~~~~~~~~ .. container:: table-row Attribute **halign** Data type string Description **Horizontal alignment** within the label. Valid values are - L: Left - C: Center - R: Right Default L .. _width: **width** ~~~~~~~~~ .. container:: table-row 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: **height** ~~~~~~~~~~ .. container:: table-row 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: **top** ~~~~~~~ .. container:: table-row Attribute **top** Data type float Description **Top margin** within the label (in measurement units). Default 0 .. _left: **left** ~~~~~~~~ .. container:: table-row 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: **right** ~~~~~~~~~ .. container:: table-row Attribute **right** Data type float Description **Right margin** within the label (in measurement units). Only used if the image is right aligned. Default 0 .. ###### END~OF~TABLE ###### .. _odl-tcpdf-label: 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: :: ... The view helper has no arguments. .. _odl-tcpdf-page: 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: :: ... The view helper has no arguments. .. _odl-tcpdf-text: odl:tcpdf.text """""""""""""" This view helper renders a text cell to the current label. Example: :: {device.manufacturer.name} {device.name} The possible arguments are as follows: .. ### BEGIN~OF~TABLE ### .. _text: **text** ~~~~~~~~ .. container:: table-row 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: **width** ~~~~~~~~~ .. container:: table-row 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: **height** ~~~~~~~~~~ .. container:: table-row 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: **x** ~~~~~ .. container:: table-row 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: **y** ~~~~~ .. container:: table-row 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: **halign** ~~~~~~~~~~ .. container:: table-row Attribute **halign** Data type string Description **Horizontal alignment** within the label. Valid values are - L: Left - C: Center - R: Right Default L .. _valign: **valign** ~~~~~~~~~~ .. container:: table-row 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: **fontfamily** ~~~~~~~~~~~~~~ .. container:: table-row 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 <#1.6.3.2.odl:tcpdf.font|outline>`_ 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: **fontstyle** ~~~~~~~~~~~~~ .. container:: table-row 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: **fontsize** ~~~~~~~~~~~~ .. container:: table-row Attribute **fontsize** Data type float Description **Font size** (in points) to be used. Default See **fontsize** argument of the `odl:tcpdf <#1.6.3.1.odl:tcpdf|outline>`_ view helper .. _fontcolor: **fontcolor** ~~~~~~~~~~~~~ .. container:: table-row Attribute **fontcolor** Data type array Description **Font color** , given as fluid array of RGB values. Default {0: 0, 1: 0, 2:0} (= black) .. _cursor: **cursor** ~~~~~~~~~~ .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Known-problems: Known problems -------------- There are no known problems right now. Please report any problems `to the author `_ . .. _To-Do-list: 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: ChangeLog --------- .. ### BEGIN~OF~TABLE ### .. _0-20: 0.20 ^^^^ .. container:: table-row Version 0.20 Changes Language label and example template additions; Added backend fields for browser features and debugging options; Manual corrections .. _0-1-2: 0.1.2 ^^^^^ .. container:: table-row Version 0.1.2 Changes Maintenance release; Added “connectivity” options to device records; manual corrections .. _0-1-1: 0.1.1 ^^^^^ .. container:: table-row Version 0.1.1 Changes Manual corrections .. _0-1-0: 0.1.0 ^^^^^ .. container:: table-row Version 0.1.0 Changes Initial public release to the TYPO3 Extension Repository .. ###### END~OF~TABLE ###### .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 44 .. :id: graphics5 .. :name: graphics5 .. :vspace: 57 .. :width: 161 .. |img-2| image:: img-2.png .. :align: left .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 508 .. :id: Grafik1 .. :name: Grafik1 .. :width: 567 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 341 .. :id: Grafik10 .. :name: Grafik10 .. :width: 567 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 396 .. :id: Grafik2 .. :name: Grafik2 .. :width: 567 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 506 .. :id: Grafik4 .. :name: Grafik4 .. :width: 567 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 603 .. :id: Grafik3 .. :name: Grafik3 .. :width: 567 .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :height: 339 .. :id: Grafik5 .. :name: Grafik5 .. :width: 567 .. |img-9| image:: img-9.png .. :align: left .. :border: 0 .. :height: 162 .. :id: Grafik6 .. :name: Grafik6 .. :width: 567 .. |img-10| image:: img-10.png .. :align: left .. :border: 0 .. :height: 350 .. :id: Grafik7 .. :name: Grafik7 .. :width: 567 .. |img-11| image:: img-11.png .. :align: left .. :border: 0 .. :height: 309 .. :id: Grafik8 .. :name: Grafik8 .. :width: 567 .. |img-12| image:: img-12.jpeg .. :align: left .. :border: 0 .. :height: 302 .. :id: Grafik11 .. :name: Grafik11 .. :width: 227 .. |img-13| image:: img-13.jpeg .. :align: left .. :border: 0 .. :height: 354 .. :id: Grafik12 .. :name: Grafik12 .. :width: 567 .. |img-14| image:: img-14.jpeg .. :align: left .. :border: 0 .. :height: 379 .. :id: Grafik9 .. :name: Grafik9 .. :width: 567