Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Print Server

Modified on Mon, 19 Aug at 3:29 PM

The Print Server is a requirement of the Print Service plugin.


Contents


Installation Print Server under Windows

The installation of the necessary Print Server requires different procedures depending on the operating system. The Print Server installation files can be downloaded from the Customer Cloud (login required).


Installation of Node.js

  • Download the LTS version at https://nodejs.org/ (from print server version 3.0.0 at least version 18)
  • Execute MSI file
  • Run through the wizard steps, whereby the default settings can be left as they are.


Installation steps for the Print Server

  • You can download the Print Server installation files here via the Customer Cloud
  • Unzip the ZIP file "print_server_fc.zip" and move the contents to the print_server_fc folder under C:\Program Files\.
  • For installation, open the command line (cmd) with administrative rights and execute the following commands:
cd C:\Programme\print_server_fc
npm install
npm install -g node-windows
npm link node-windows
node install-windows-service.js

A new FORMCYCLE Print Server service is now available. Please ensure that it has been started before running a test. The script install-windows-service.js contains standard variables for the installation of the Print service.


  • The service is installed on port 8090 by default. To change this, you must adjust the parameter --port=8090 in the file install-windows-service.js and adjust the parameter --port=8090.
  •  Logging is activated by default. To change this, change the parameter --verbose=true to --verbose=false.


After installation, a folder with the name daemon is created for the log files.


Deinstallation

To remove the Print Server, open a command line (cmd) with administrative rights and execute the following commands:

cd C:\Program Files\print_server_fc
node uninstall-windows-service.js

Update

In principle, an update is possible by uninstalling the print service and then reinstalling it.
In most cases, however, it is enough to replace the server script files and update the dependencies via npm:

  • Download the current version "print_server_fc.zip".
  • Stop the Windows service FORMCYCLE Print Server.
  • Copy all files from this ZIP file to the folder where the print service is currently installed (select "Overwrite files" when asked).
  • Important: The daemon folder and the files it contains should not be changed!
  • Open a Windows command line (cmd) with administrative authorizations.
  •  Change to the print_server_fc folder where the files were copied.
  •  Now update the dependencies via npm install. This command may take a few moments. It is necessary that the server has an internet connection. If a connection is not possible, please look here.
  • The Print Service Windows service can now be restarted.

If the update results that the service is no longer starting, you should reinstall it. Please uninstall first and then follow the steps under Installation.



Installation Print Server under Linux

Installation steps for the installation of Node.js and the Print server#

We offer a ready-to-use installation script for some distributions. For the current print server version there is currently only the script install_printserver_ubuntu22.sh, which works under Debian 11, Debian 12 and Ubuntu 22.04. There is also the script install_printserver_ubuntu24.sh for Ubuntu 24.04. Open the console and load the installation script:

# Download the installation script for Debian 11/12 and Ubuntu 22.04
wget "https://customer.formcycle.eu/index.php/s/1b40tdPrvxdYhio/download?path=/&files=install_printserver_ubuntu22.sh" -O install_print_server.sh

# Alternatively: Download the installation script for Ubuntu 24.04
wget “https://customer.formcycle.eu/index.php/s/1b40tdPrvxdYhio/download?path=/&files=install_printserver_ubuntu24.sh” -O install_print_server.sh


# Download the installation files
wget "https://customer.formcycle.eu/index.php/s/1b40tdPrvxdYhio/download?path=/&files=print_server_fc.zip" -O print_server_fc.zip

# Make script executable
chmod 750 install_print_server.sh

# Start installation
./install_print_server.sh

# Execute Print server
systemctl start printserver

In the first lines of the script, you can adjust the user name/password you want to create using the variables PRINTSERVER_USER and PRINTSERVER_USER_PWD.

You can deactivate/activate the log output via the verbose parameter. The scripts for the service should be found under /home/formcycle/print_server. The verbose parameter can be adjusted in the start script.


Deinstallation

To remove the Print Server, open a command line (cmd) with administrative rights and execute the command /home/formcycle/deinstall_printserver.sh.


Depending on the existing system, some Linux packages such as nodejs were also installed during the installation. However, it is not possible to uninstall the packages automatically. Only delete the automatically installed packages if you are 100% sure that they are no longer needed!


Update

In principle, an update is possible by uninstalling the print service and then reinstalling it.
In most cases, however, it is enough to replace the server script files and update the dependencies via npm:


  • Download the current version "print_server_fc.zip".
  • Stop the print service system service FORMCYCLE Print Sever: systemctl stop printserver
  • Copy the files from this zip file to the folder where the print service is currently installed (select "Overwrite files" when asked). The files should be located under /home/formcycle/print_server by default.
  • Open a command line (cmd) with administrative rights and change to the folder where the files were copied. The files should be located under /home/formcycle/print_server by default.
  • Now update the dependencies via npm install. This command may take a few moments. It is necessary for the server to have an internet connection. If a proxy is required, please look here.
  • Now the print service system service can be restarted: systemctl start printserver


Update NodeJS to a higher/current version

Current NodeJS version

# Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
apt-get install -y nodejs


NodeJS Version 18

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs


Test

To check whether the installation was successful, the service can be called up on the local server as a test (in this example, an attempt is made to print the formcycle.de website):

http://localhost:8090/pdf?orientation=landscape&format=A4&wait=false&marginTop=0mm&formURL=http://www.formcycle.de


Troubleshooting

Command npm is not found

Under Windows, it is possible that the environment variables are not set correctly after the NodeJS installation and npm install cannot be executed. This could also be noticed if the default path under C:/Program Files was not used during NodeJS installation. So check the path to make sure this is available. The following must be done:

  • Open the environment variables via Control Panel > System > Advanced System Settings > Environment Variables button
  • The following entries should be found under Path: C:\Users\{username}\AppData\Roaming\npm;C:\Program Files\nodejs
  • Confirm with Ok. The console then needs to be reopened with admin rights.


Printing does not work

If printing via formcycle is not possible, the cause could be that the print service is not accessible. This can be resolved using the Loopback URL. Under System > General > Loopback URL, Loopback base URL: 

http://localhost:<port>/formcycle


PDF is printed, but the message 404 appears

In this case, the print service works correctly because a PDF is already generated. Check that the loopback URL is entered correctly so that the URL to the print service is resolved correctly.


Chromium download fails

The following error message appears on the console after executing "npm install":

Error: unable to verify the first certificate


The steps described below are only a workaround and the environment variables should be set back to the default values after successful installation!

PS C:\test> $env:NODE_TLS_REJECT_UNAUTHORIZED = 0 
PS C:\test> npm set strict-ssl false 

Command npm install results in timeout

The command npm install does not work because of a proxy, then the general proxy setting is not enough. The following must be executed via the console:


npm config set proxy http://proxy.domain:port
npm config set https-proxy https://proxy.domain:port


If user data are required:

npm config set proxy http://user:[email protected]:port
npm config set https-proxy https://user:[email protected]:port


Further information can also be found here: http://www.fladi.de/2014/02/06/howto-npm-hinter-einem-proxy-verwenden/


Print server Changelog

3.1.0

  • Update puppeteer to latest / Chrome 127.0.6533.72

3.0.0

  • Requires at least node.js version 18 
  • Update puppeteer to latest / Chrome 121.0.6167.85

2.0.4

  • Update puppeteer to the latest version / Chrome 118.0.5993.70

2.0.3

  • Update puppeteer to 21.2.0 / Chrome 116.0.5845.96 
  • Server time is used for log entries instead ofGMT+0

2.0.2

  • Disable new headless mode for Chrome for now

2.0.1

  • Print server always binds to IPv6 addresses, if possible.

2.0.0

  • Update of the Chromium browser used for printing.

1.8.0

  • Browser tabs are closed correctly again. This could result in the print service consuming more and more memory.
  • Chromium profile is deleted when the print server is closed.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article