You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

Installation

The Document Renderer Service can be installed using the installer. After installation, the configuration can be found in the <blueriq installation home>\Services\document-renderer\Properties folder.

Supported platforms

The service is supported for Windows and Linux, it is delivered in a self-contained executable. The platform binaries can be found in the download zip under the \Services\document-renderer folder. Both the Windows and Linux executables are configured to be run as services on the supported platforms.

Windows 

The Document Renderer Service can be run directly on Windows by executing BlueriqDocumentRenderer.API.exe or by registering it as a Windows Service.

Linux

The Document Renderer Service can be run directly on Linux by executing BlueriqDocumentRenderer.API, we also have provided a service template which needs to be configured for when registering the service as a daemon.

System requirements

Minimal

2 CPU cores
512 MB RAM

2 CPU cores
1 GB RAM


Disclaimer

System requirements can differ based upon the document size which needs to be rendered. The Document Renderer Service will load the images which are send in the rendering request into its memory, therefore if the document renderer service is used to render documents containing high-resolution images the system's requirements needs to be adjusted accordingly. 

Third party tools

Ibex

The Document Renderer Service used Ibex PDF Creator to renderer PDF documents with.

Configuration

Document templates

Blueriq delivers default templates for rendering Blueriq Documents. You can to customize these templates to fit the look-and-feel of your company. The templates can be found in the <blueriq installation home>\Services\document-renderer\Resources\documents folder.

To customize the rendering files you need to have knowledge about XSL and XSL:FO.

Font Configuration

By default the OS fonts folder (where the Document Renderer Service is hosted) will be scanned for available fonts which can be used in the PDF generation. Only ttf and ttc fonts are supported.

Custom font directory

Custom fonts can be added by setting the 'fonts:location' property. This property is a relative path from the 'blueriq:documents:baseFolder'.  In the properties example below the custom fonts location is set to 'Resources/documents/fonts/'. All fonts in this folder, and subfolders will be recursively added to the document renderer, and can be used in the documents.


Config
blueriq:
  documents:
    baseFolder: Resources/
    xsltStyleSheet: documents/ibex/styles.xsl
    fonts:
      location: documents/fonts/
      aliasList:
        fontawesome regular: fontawesome
		font_id_xslt: fontname

Font Alias

When the fontname doesn't match the used id in the XSLT, an alias can be set for the font.

For example : Although it looks like the font is registered in windows under the name 'fontawesome regular', it actually is 'fontawesome'. In the XSLT the font is used with the id 'fontawesome regular' so an alias has to be used for the document renderer to match the font. As much aliases can be registered as needed. First is the key used in the XSTL, value is the fontname which is referred to.

Logging

The Blueriq Document Renderer Service uses Serilog for logging. Serilog configuration is read from the Serilog section in the <blueriq installation home>\Services\document-renderer\Properties\blueriq-document-renderer.yml file. For more information on Serilog configuration options, consult the Serilog configuration documentation.
The Blueriq Document Renderer Service supports the Console and the File sink.

HTTPS

By default, the Document Renderer uses HTTP. It can be configured to use HTTPS instead by changing the Properties/hostsettings.json file. Certificates can either be loaded from a certificate store or from a file on disk. Below you will find an example for both cases. It is also possible to configure multiple endpoints that use different certificates. For more examples, please refer to the Kestrel documentation.

Configuration example for loading certificate from disk
// Javascript-style comments are allowed in the hostsettings.json file
{
  "Kestrel": {
    "Endpoints": {
      "Https": {
	    // Configure host name and port 
        "Url": "https://example.com:443",
        "Certificate": {
          "Path": "C:/certs/cert.pem",
          "KeyPath": "C:/certs/key.pem",
		  // Please note that the `password` property is optional
		  "Password": "P4ssw0rd!"
        }
      }
	  // Additional endpoints could be specified here:
	  // , "Example": {
	  //   ....
	  // }
    }
  }
}
Configuration example for loading certificate from certificate store
{
  "Kestrel": {
    "Endpoints": {
      "Https": {
        "Url": "https://example.com:443",
        "Certificate": {
          "Subject": "<subject; required>",
          "Store": "<certificate store; required>",
          "Location": "<location; defaults to CurrentUser>",
          "AllowInvalid": "<true or false; defaults to false>"
        }
      }
    }
  }
}


Dynamic images

The Document Renderer Client component provides support for adding dynamic images to a document.

  • No labels