Difference between revisions of "Printing Text Definitions"
From PartKeepr Wiki
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Printing]] | [[Category:Printing]] | ||
− | For a flexible rendering, we support replacing texts in the predefined text strings for the renderer. This is available to every renderer as a special class (PartKeepr\Printing\Utils\Placeholder) for Plugin developers. For users this has the advantage to alwayse have the same codewords which will be replaced. However the surrounding is dependent on the plugin. For e.g. for the DefaultPDFRenderer these surrounding is a !! , so a | + | For a flexible rendering, we support replacing texts in the predefined text strings for the renderer. This is available to every renderer as a special class (PartKeepr\Printing\Utils\Placeholder) for Plugin developers. For users this has the advantage to alwayse have the same codewords which will be replaced. However the surrounding is dependent on the plugin. For e.g. for the DefaultPDFRenderer these surrounding is a !! , so a replacement looks like !!id!!. |
+ | |||
+ | == Additional formatting of data == | ||
+ | The data returned by the replacement can be configured to use a sprintf() [[http://php.net/manual/en/function.sprintf.php]] format string. This format string is appended with a ',' to the field name. | ||
+ | For e.g. if you need a 6 digit wide 0 padded id, use !!id,%06d!!. | ||
== Replacements for Parts == | == Replacements for Parts == | ||
Line 12: | Line 16: | ||
| id | | id | ||
| The internal id of the database. E.g. 5 | | The internal id of the database. E.g. 5 | ||
+ | |- | ||
+ | | barcodeId | ||
+ | | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used: | ||
+ | * 1 for Parts | ||
+ | * 2 for StorageLocations | ||
|- | |- | ||
| name | | name | ||
Line 36: | Line 45: | ||
== Replacement for Storage Locations == | == Replacement for Storage Locations == | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! scope="col"| Codeword | ||
+ | ! scope="col"| Description | ||
+ | |- | ||
+ | | id | ||
+ | | The internal id of the database. E.g. 5 | ||
+ | |- | ||
+ | | barcodeId | ||
+ | | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used: | ||
+ | * 1 for Parts | ||
+ | * 2 for StorageLocations | ||
+ | |- | ||
+ | | name | ||
+ | | The name of the storage location. | ||
+ | |} |
Latest revision as of 23:59, 1 February 2013
For a flexible rendering, we support replacing texts in the predefined text strings for the renderer. This is available to every renderer as a special class (PartKeepr\Printing\Utils\Placeholder) for Plugin developers. For users this has the advantage to alwayse have the same codewords which will be replaced. However the surrounding is dependent on the plugin. For e.g. for the DefaultPDFRenderer these surrounding is a !! , so a replacement looks like !!id!!.
Additional formatting of data
The data returned by the replacement can be configured to use a sprintf() [[1]] format string. This format string is appended with a ',' to the field name. For e.g. if you need a 6 digit wide 0 padded id, use !!id,%06d!!.
Replacements for Parts
Codeword | Description |
---|---|
id | The internal id of the database. E.g. 5 |
barcodeId | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used:
|
name | The name of the part. |
internalNumber | The internal part number field. |
description | The description for the part. |
categoryFull | The category including its path as you can see it in the parts list. |
categoryLast | Only the last (right) part of the category. |
footprintName | The name of the footprint |
storageLocationName | The name of the storage location |
Replacement for Storage Locations
Codeword | Description |
---|---|
id | The internal id of the database. E.g. 5 |
barcodeId | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used:
|
name | The name of the storage location. |