There are a lot of software that can convert text files into PDF files. In Linux, you can convert text text into PDF without using software. Step, the following small series will introduce you to Linux to convert text files into PDF files.
Question: I want to convert a plain text file into a PDF document. Is there an easy way to convert a text file to a PDF file under the Linux command line?
When you have a bunch of text files to be maintained, convert them into PDF documents will be better. For example, PDF is more suitable for printing because PDF documents have a predefined layout. In addition to this, you can reduce the risk of accidental modification of your documents.
To convert a text file to PDF, you have to follow the two steps below.
Getting Ready
First you have to install two packages you need.
On Debian, Ubuntu or Linux Mint:
$ sudo apt-get install enscript ghostscript
On Fedora, CentOS/RHEL:
$ Sudo yum install enscript ghostscript
On Arch Linux:
$ sudo pacman -S enscript ghostscript
Converting text files to PDF
Once you're done, generate a PDF file from the text file in the following two steps.
First, use the enscript command-line tool to convert the text file to postscript format.
$ enscript -p output.ps input.txt
Finally convert the postscript format file to a PDF file.
$ ps2pdf output.ps output.pdf
The above is the introduction of Linux to convert text files into PDF. Here you need to use the command line tool, if you don't know the command line very well. Friends, you can also download related tools to convert.
Samba is a tool that can implement SMB protocol. You can share Linux system software through Samba s
OpenWRT is an embedded Linux system. Friends who want to understand the embedded Linux system are bl
In Linux, two tools, tmux and vim, can be used to develop projects. Many people pre
The ssh connection server in the Linux system will have an automatic interrupt time
Linux using virtual machine to install Windows 10
How CentOS 6 modifies disk quota limits
How to extract multiple compressed files at the same time in Linux
How Linux can modify the TCP port range
Linux how to install and use NeoBundle
CentOS 6.5 install wireless network card driver tutorial
How to use vim to set up network on CentOS
How to restore the boot partition deleted by CentOS 6
How to compile and install Mono notes in Linux system
Linux installation and configuration of rsync and sersync methods
U disk system do-it-yourself production (2)
Windows 9 more details exposure
How Windows XP Prevents Hacking (2)
UC's four major cheats reveals
Practical commands and operating skills in Windows XP
Windows 7 affects laptop battery life
Win7/win8 system debugging IE11 browser JS script method
Win10 system binds Microsoft accounts to local computers
Use the keyboard to play Windows 7 commonly used hotkeys Raiders