Skip to main content
Version: 2.2.1

PDF conversion (HTTPS)

This topic will show how to configure the PDF converter with HTTPS protocol on port 8585.

To do that, take the following steps:

danger

In order to take the steps below, you will need:

  • The .pfx SE certificate file and its password;
  • To run the commands below as root.
  1. Create the sepdfconverter directory:
mkdir /usr/local/se/sepdfconverter
  1. Access the sepdfconverter directory:
cd /usr/local/se/sepdfconverter
  1. Create the docker-compose.yml file inside the sepdfconverter directory.
vim docker-compose.yml
  1. Paste the following text:
version: '3.7'

services:
sepdfconverter:
container_name: sepdfconverter
image: softexpert/sepdfconverter:latest
extra_hosts:
- SEAccessURL:ServerIP
environment:
- ASPNETCORE_URLS=https://+:443;
- ASPNETCORE_Kestrel__Certificates__Default__Password=${CERTIFICATE_PASSWORD}
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/${CERTIFICATE_NAME}
ports:
- "${HTTPS_PORT}:443"
volumes:
- ./cert:/https:ro
- ./conf:/app/conf/
deploy:
resources:
limits:
memory: 1G
  1. Locate the extra_hosts parameter.

  2. Insert the SE access URL and the local IP of the application server, as shown in the image below.

PDF conversion 01
  1. Create the cert directory:
mkdir /usr/local/se/sepdfconverter/cert
  1. Paste the .pfx certificate file to the /usr/local/se/sepdfconverter/cert directory and save it with the name certificate.pfx.

  2. Create the pdf.env file inside the sepdfconverter directory.

vim pdf.env
  1. Insert the text below, indicating the port that will be used for HTTPS connection, and enter the certificate password in the CERTIFICATE_PASSWORD= parameter:
CERTIFICATE_NAME=certificate.pfx
CERTIFICATE_PASSWORD=enter password here
HTTPS_PORT=8585
PDF conversion

By default, the port used for HTTPS connection is 8585, but it is possible to set a different port if the default one is already being used. In this case, run the netstat -lnp | grep "8585" command to check whether the port is being used.

  1. Start the PDF conversion service using the command below:
cd /usr/local/se/sepdfconverter/ ; docker-compose --env-file pdf.env --compatibility up -d
  • To stop the service, run the command below:
cd /usr/local/se/sepdfconverter/ ; docker-compose --env-file pdf.env down
  • To check whether the sepdfconverter service is up, run the command below:
docker ps
PDF conversion 02
  1. Once this is done, access the SoftExpert Document component > Configuration -> General parameters (DC035) and point the service in the application by entering https://serverIP:8585 in the Enable PDF conversion service > Server field.

  2. Then, run the connection test and save.

  3. After completing all the configuration, run a file conversion test for .doc, .docx, .xls, and .xlsx.