Difference between revisions of "Printing Advanced PDF Cofiguration"
(Created page with "Often the default configuration is not suitable for your needs. The DefaultPDFRenderer has a bunch of options to configure. To use these configurstions, the "Additional Config...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Often the default configuration is not suitable for your needs. The DefaultPDFRenderer has a bunch of options to configure. To use these configurstions, the "Additional Configurations" field in the Printing Configuration can be used. All things entered here, are encoded in JSON format, but no fear it is quite simple to use. | + | [[Category:Printing]] |
+ | |||
+ | Often the default configuration is not suitable for your needs. The DefaultPDFRenderer has a bunch of options to configure. To use these configurstions, the "Additional Configurations" field in the Printing Configuration can be used. All things entered here, are encoded in JSON (if you have complex szenarios for the text, you can use the following editor: [[http://jsoneditor.appspot.com]]) format, but no fear it is quite simple to use. | ||
This JSON with all defaults are shown below. If you will not add one of these settings, the default will be used: | This JSON with all defaults are shown below. If you will not add one of these settings, the default will be used: | ||
Line 6: | Line 8: | ||
,"barcodeEnable":false | ,"barcodeEnable":false | ||
,"barcodeType":"QRCODE,L" | ,"barcodeType":"QRCODE,L" | ||
− | ,"textBarcode":" | + | ,"textBarcode":"!!barcodeId,%06d!!" |
,"barcodeWidth":"12" | ,"barcodeWidth":"12" | ||
,"barcodeHeight":"12" | ,"barcodeHeight":"12" | ||
Line 17: | Line 19: | ||
,"fontSize":12 | ,"fontSize":12 | ||
,"text":"<span style=\"font-size: 11pt;\"><b>!!name!!<\/b><\/span><br><span style=\"font-size: 8pt;\">!!description!!<\/span>" | ,"text":"<span style=\"font-size: 11pt;\"><b>!!name!!<\/b><\/span><br><span style=\"font-size: 8pt;\">!!description!!<\/span>" | ||
+ | ,"textXOffset":"0" | ||
+ | ,"textYOffset":"0" | ||
} | } | ||
</nowiki> | </nowiki> | ||
Line 38: | Line 42: | ||
|- | |- | ||
| barcodeWidth | | barcodeWidth | ||
− | | The width of the barcode. See Size and position formating | + | | The width of the barcode. See [[Printing Size and Positon Formating|Size and position formating]]. |
|- | |- | ||
| barcodeHeight | | barcodeHeight | ||
− | | The height of the barcode. See Size and position formating | + | | The height of the barcode. See [[Printing Size and Positon Formating|Size and position formating]]. |
|- | |- | ||
| barcodeXPos | | barcodeXPos | ||
− | | The x position starting the left top. See Size and position formating. | + | | The x position starting the left top. See [[Printing Size and Positon Formating|Size and position formating]]. |
|- | |- | ||
| barcodeYPos | | barcodeYPos | ||
− | | The y position starting at the top left from the cell. See Size and position formating. | + | | The y position starting at the top left from the cell. See [[Printing Size and Positon Formating|Size and position formating]]. |
|- | |- | ||
| barcodeWithText | | barcodeWithText | ||
Line 65: | Line 69: | ||
|- | |- | ||
| text | | text | ||
− | | The text to use. The text can use a LIMITED amount of different html definitions supported by TCPDF. You can use field replacement here. Be careful to quote the html text, especially the \ and the " correctly. | + | | The text to use. The text can use a LIMITED amount of different html definitions supported by TCPDF. You can use field replacement here. Be careful to quote the html text, especially the \ and the " correctly. If you use a barcode, we try to let the text flow around the barcode if possible. |
+ | |- | ||
+ | | textXOffset | ||
+ | | Offset for the text position in X direction. Per default, the Text is printed at position 0. | ||
|- | |- | ||
+ | | textYOffset | ||
+ | | Offset for the text position in Y direction. Per default, the Text is printed at position 0. | ||
|} | |} | ||
== Text replacement == | == Text replacement == | ||
− | The text can contain fields from the dataset we render. These replacement texts can be seen on a separate page [[ | + | The text can contain fields from the dataset we render. These replacement texts can be seen on a separate page [[Printing Text Definitions]]. The codewords are surrounded by !!. Example: !!id!! will be replaced by the id of a part if parts are rendered. |
Latest revision as of 23:13, 1 February 2013
Often the default configuration is not suitable for your needs. The DefaultPDFRenderer has a bunch of options to configure. To use these configurstions, the "Additional Configurations" field in the Printing Configuration can be used. All things entered here, are encoded in JSON (if you have complex szenarios for the text, you can use the following editor: [[1]]) format, but no fear it is quite simple to use.
This JSON with all defaults are shown below. If you will not add one of these settings, the default will be used:
{"borderGrid":true ,"barcodeEnable":false ,"barcodeType":"QRCODE,L" ,"textBarcode":"!!barcodeId,%06d!!" ,"barcodeWidth":"12" ,"barcodeHeight":"12" ,"barcodeXPos":"-7" ,"barcodeYPos":"-7" ,"barcodeWithText":false ,"barcode2D":true ,"fontFamily":"times" ,"fontStyle":"" ,"fontSize":12 ,"text":"<span style=\"font-size: 11pt;\"><b>!!name!!<\/b><\/span><br><span style=\"font-size: 8pt;\">!!description!!<\/span>" ,"textXOffset":"0" ,"textYOffset":"0" }
Attribute | Description |
---|---|
borderGrid | true or false. enables the border grid of the "table" created by the renderer. This should be disabled for label printing. |
barcodeEnable | Enables rendering the barcode. Set to true to enable or false to disable. |
barcodeType | The type of barcode to use. A list of codes can be found in: TCPDF, scroll down to __construct [[2]] Use also the correct barcode2D field! |
textBarcode | The text of the barcode. You can use field replacement here. |
barcodeWidth | The width of the barcode. See Size and position formating. |
barcodeHeight | The height of the barcode. See Size and position formating. |
barcodeXPos | The x position starting the left top. See Size and position formating. |
barcodeYPos | The y position starting at the top left from the cell. See Size and position formating. |
barcodeWithText | true or false. Enables the text for the barcode. |
barcode2D | true or false. Indicates if we want to print a 2D barcode. |
fontFamily | The font family to use inside the text as default. Search for setFont in [[3]] to see which families are available. |
fontStyle | The default font style of the text. Search for setFont in [[4]] to see which styles are available. |
fontSize | The size of the font. |
text | The text to use. The text can use a LIMITED amount of different html definitions supported by TCPDF. You can use field replacement here. Be careful to quote the html text, especially the \ and the " correctly. If you use a barcode, we try to let the text flow around the barcode if possible. |
textXOffset | Offset for the text position in X direction. Per default, the Text is printed at position 0. |
textYOffset | Offset for the text position in Y direction. Per default, the Text is printed at position 0. |
Text replacement
The text can contain fields from the dataset we render. These replacement texts can be seen on a separate page Printing Text Definitions. The codewords are surrounded by !!. Example: !!id!! will be replaced by the id of a part if parts are rendered.