src/lib/label-print/label-print.component.ts
Convert the label setup together with data to html that can be used for printing.
Please note that this will not generate pdf. Instead this will generate html that can be used to generate the pdf externally. It's up to the host system to decide what to do with the html received.
changeDetection | ChangeDetectionStrategy.OnPush |
selector | ll-label-print |
styleUrls | ./label-print.component.scss |
templateUrl | ./label-print.component.html |
Methods |
Inputs |
Outputs |
btnClass |
Default value : 'btn btn-default'
|
Css class that are on the print button. |
data |
Type : object[]
|
Array that holds key value objects that are used for the data on the label. |
qrCodeErrorCorrectionLevel |
Type : QRCodeErrorCorrectionLevel
|
Default value : QRCodeErrorCorrectionLevel.levelM
|
Error correction level used for the QR Code |
setup |
Type : ISetup
|
Setup used for the label |
visible |
Default value : true
|
Show elements that are printed. |
html |
Type : EventEmitter<string>
|
This event is triggered when the html generated from the labels are ready. Event will have the html string in it. |
pressed |
Type : EventEmitter<void>
|
This event is triggered when print button is pressed or when renderPages method is called. |
renderPages |
renderPages()
|
Render the label pages. This method can be used to start page rendering even if the button itself would not be visible.
Returns :
void
|