From 7e4d50014d4ce76707223d6ac0cf0d91a4280c39 Mon Sep 17 00:00:00 2001 From: TimAle Date: Mon, 16 Mar 2020 13:19:42 +0300 Subject: [PATCH] HCX-58 Add PDF conversion option to Imprint print interface --- src/org/camunda/latera/bss/connectors/Imprint.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/camunda/latera/bss/connectors/Imprint.groovy b/src/org/camunda/latera/bss/connectors/Imprint.groovy index 82899842..05a73a04 100644 --- a/src/org/camunda/latera/bss/connectors/Imprint.groovy +++ b/src/org/camunda/latera/bss/connectors/Imprint.groovy @@ -36,7 +36,7 @@ class Imprint { ) } - def print(CharSequence template, Map data = [:]) { + def print(CharSequence template, Map data = [:], convertToPDF = false) { logger.info('Printing begin...') if (!data) { data = Order.getData(execution) @@ -54,7 +54,8 @@ class Imprint { monthFull : format(now, MONTH_FULL_FORMAT, this.locale), todayFull : format(now, FULL_DATE_FORMAT, this.locale), homsOrderCode : execution.getVariable('homsOrderCode') - ] + data + ] + data, + options : [ convert_to_pdf : convertToPDF ] ] try { return this.http.sendRequest( @@ -71,4 +72,4 @@ class Imprint { def print(Map data, CharSequence template) { return this.print(template, data) } -} \ No newline at end of file +}