X
The image shows how PDFreactor converts HTML to PDF with Linux

HTML to PDF using Linux

No matter on which operating system you want to create a PDF from HTML – PDFreactor creates excellent results in a lot of operating system environments. If you want to convert HTML to PDF in Linux, PDFreactor is an easy and reliable PDF creator with a lot of areas of application. Discover features like bookmarks, comments or the accessibility of PDF files. PDFreactor can also be used as a Java library, Web Service or from the command line. Still not convinced? Learn more about PDFreactor and Linux below.

What is Linux?

Linux is a free Unix-like operating system developed in 1991 and is based on the Linux kernel. The kernel itself is only a basic operating system which is enhanced by supporting system software and libraries, many of which are provided by the GNU Project. Linux is typically packaged in a Linux distribution.

The operating system Linux is most used for web servers and supercomputers. In the desktop area and with laptops, Linux (still) plays a subordinate role. The penguin named tux is the mascot of Linux. Today, there are numerous Linux variants such as Ubuntu or Mint.  Only these Linux distributions are fully-fledged operating system sets. The main users include governments, organizations and companies. Linux is free of charge and freely accessible. Linux including Ubuntu allows the user to convert HTML to PDF. You are looking for a PDF converter in Linux? You can rely on PDFreactor for perfectly printing HTML to PDF in Linux.

You want to convert HTML to PDF in Unix? PDFreactor also supports the operating system Unix.

Ubuntu: Convert HTML to PDF

With PDFreactor it is also easily possible to convert HTML to a PDF file in Ubuntu, which is a computer operating system based on the Debian Linux distribution. Debian has been available since 1993 and is maintained exclusively by the community. Ubuntu is using its own desktop environment and is very much appreciated by Linux users. The name comes from the African philosophy of Ubuntu and means “humanity towards others”. The goal of Ubuntu is to create an easy to use operating system for the user. PDFreactor joins this goal and offers the easiest way for Ubuntu users to convert HTML to PDF.

Linux: HTML to PDF with Linux Mint

Another example of a Linux distribution, besides Ubuntu is Linux Mint. Mint and Ubuntu differ mainly in their graphical user interfaces. User interfaces of Mint are Cinnamon and Mate. Basically, Ubuntu programs can also be installed on Linux Mint, because Mint is based on Ubuntu. Creating a PDF file with Linux Mint is simple. PDFreactor supports all Linux based systems. The HTML to PDF converter for Linux, Ubuntu and Mint provides you with high-quality PDF files. Try out our Linux Mint and Ubuntu PDF converter.

How to convert HTML to PDF in Linux?

For printing HTML to PDF in Linux it is necessary to install the PDFreactor package suitable for the Linux system. Either unpack the archive for Linux or use the RPM. In both case, a separate Java installation is required. PDFreactor is also delivered as a Java PDF library. So the integration is completely platform-independent. When using the RPM package to install PDFreactor including the Web Service, PDFreactor will be registered as a systemd service or “Init” script. Additionally a user – called pdfreactor – for the PDFreactor Web Service will be created. For more information about the download, installation, integration and conversion look at our Quick Start Guide. You will quickly see why PDFreactor is one of the best HTML to PDF converters for Linux and other operating systems.

HTML to PDF Linux command line

The command line of the PDFreactor for Linux to convert HTML to PDF is a Python client for the PDFreactor Web Service. With the command line you can simple integrate the PDF creator in Linux into shell scripts. When using the PDFreactor Linux archive, the PDFreactor Web Service does not install or start automatically. Use the following command lines to start or stop the Web Service (navigate to “PDFreactor/jetty/bin/” before):

./pdfreactorwebservice start
./pdfreactorwebservice stop

As mentioned earlier the PDFreactor Web Service will be registered as a systemd service or init script. With the following command line, you can start, stop, restart or display the status of this service:

service pdfreactor start
service pdfreactor stop
service pdfreactor restart
service pdfreactor status

If your system does not support systemd, the RPM installer will register as an init script for converting HTML to PDF in Linux. The command lines below will help you to start, stop, restart or display the status of the service:

/etc/init.d/pdfreactorwebservice start
/etc/init.d/pdfreactorwebservice stop
/etc/init.d/pdfreactorwebservice restart
/etc/init.d/pdfreactorwebservice status

APIs to convert HTML to PDF with Linux

PDFreactor features APIs in a lot of languages. The application programming interfaces help to provide the connection of your application to the PDFreactor Web Service. APIs like JavaScript, Java, PHP, .NET, Python, Ruby, Perl, Node.js, SOAP and REST are available. For each API there are specific requirements. As Python is installed on most Linux systems by default you can easily use the Python API to convert HTML to PDF in Linux as shown in the following example:

#!/usr/bin/python
from PDFreactor import *
pdfReactor = PDFreactor("https://cloud.pdfreactor.com/service/rest")
config = {
    'document': "http://www.pdfreactor.com/product/samples/textbook/textbook.html",
}
result = None
try:
    result = pdfReactor.convertAsBinary(config)
except Exception as e:
    print("An Error Has Occurred")
    print(str(e))
if result != None:
    f = open('result.pdf', 'w+b')
    binary_format = bytearray(result)
    f.write(binary_format)
    f.close()

Do you want to convert HTML to PDF in Linux? Trust PDFreactor

With our powerful server side conversion engine you can rely on perfect results. PDFreactor supports Linux, Ubuntu as well as other systems, so it is perfectly suited for a wide range of applications and industries. If you want more than just a PDF creator for Linux, PDFreactor will optimize the results to perfection. Besides creating a standard PDF file there are many more options, like printing catalogues or creating a daily newspaper.

Do you want to try out the wide range of functions first? No problem! Use the 30-day-trial to use the HTML to PDF converter in Linux for free! Also get in touch with our customer support if you have any questions about printing PDF files in Linux or how to install PDFreactor within your operating system.