In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to convert text files into PDF format on Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Question: I want to convert a plain text file to an PDF document. Is there an easy way to convert text files to PDF files under the Linux command line?
When you have a lot of text files to maintain, it's better to convert them into PDF documents. For example, PDF is more suitable for printing because PDF documents have predefined layouts. In addition, you can reduce the risk that the document will be accidentally modified.
To convert a text file to PDF format, you need to follow the following two steps.
Preparatory work
First of all, you need to install two required packages.
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
Convert a text file to PDF format
After the preparation is complete, follow these two steps to generate a PDF file from the text file
First, use the enscript command line tool to convert the text file to postscript format.
$enscript-p output.ps input.txt
Finally, the postscript format file is converted into PDF file.
This is the end of $ps2pdf output.ps output.pdf, "how to convert text files into PDF format on Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.