Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include this optional element with a value indicating the image format (i.e. png, jpg) to cause each html page in the report to be converted to an image of specified format.

N.B. This option works similar to the same as the <generateImage> element in the Report Module configuration. An external conversion program (default is wkthtmltoimage) needs to be configured using the global property REPORT_HTML2IMG_PROGRAM defined in the global properties file.

...

Example report export configuration, which exports the last current forecast report, generating an image for each html page, and sends three specific locations to a telegram channel:


Code Block
xmlxml
<reportExport ...>
	<reportExportRootDir>$REPORT_EXPORT_ROOT_DIR$</reportExportRootDir>
	<reportExportTelegramPhoto>
		<telegramBotToken>NNdDxIKKEe0ioFhF/v9V3coUf/fFG94HgP+16hvYQsJfdSR/s3JJx+9MzMoLA82S</telegramBotToken>
		<telegramChatId>-1001345024100</telegramChatId>
		<telegramSendPhoto>
			<reportTelegramFile>Telegram_Inhambane_2.jpeg</reportTelegramFile>
			<reportTelegramCaption>Inhambane, Morungulo (Massinga)</reportTelegramCaption>
		</telegramSendPhoto>
		<telegramSendPhoto>
			<reportTelegramFile>Telegram_Inhambane_5.jpeg</reportTelegramFile>
			<reportTelegramCaption>Inhambane, Zavora (Inharrime)</reportTelegramCaption>
		</telegramSendPhoto>
		<telegramSendPhoto>
			<reportTelegramFile>Telegram_Pemba_1.jpeg</reportTelegramFile>
			<reportTelegramCaption>Pemba, 'offshore' </reportTelegramCaption>
		</telegramSendPhoto>
	</reportExportTelegramPhoto>
	<currentForecastReports>
		<currentForcastSubDir>ForeCast</currentForcastSubDir>
		<numberCurrentForecasts>1</numberCurrentForecasts>
		<includeModuleInstanceId>Report_Telegram_Create</includeModuleInstanceId>
		<generatePdf>true</generatePdf> 
		<generateImage>jpeg<<generateImage>
          <format>png</format>
          <options>--width 720</options>
        </generateImage>
	</currentForecastReports>
</reportExport>

...