doc document to PDF from the command line using LibreOffice, run a command like: Yes, LibreOffice has a relatively powerful CLI utility, although it’s unfortunately poorly documented. In that case, you can take advantage of LibreOffice’s command-line interface, which is called soffice. This is much faster and easier when you have a large number of documents to convert, or you need to do the conversions programmatically. ![]() It looks like this:īut other times, it can be useful to convert documents to PDF format using the command line. There’s a button in the interface that allows you to do this very easily. Sometimes, I export a document to PDF in LibreOffice using the graphical interface. If I had a dollar for every time I have had to convert a word processor file to a PDF, I’d no longer have to work.įortunately, although no one pays me to convert documents to PDF, I can do it easily on Linux using LibreOffice. It only allows you to move pages around, delete pages, and so on. Unfortunately, PDF-Shuffler doesn’t support editing the content of a PDF. PDF-Shuffler is relatively basic, but it makes it easy to merge PDFs, as well as remove or reorder pages within a PDF file by dragging and dropping. Note that there’s no hyphen in the name of the package or the command-line utility. You can start it by typing in a terminal: If you prefer a visual interface for merging or editing PDFs, you can use PDF-Shuffler. ![]() I find this handy when, for example, I am working on a book manuscript and need to update the master manuscript by combining individual chapters (which are separate PDFs) into a single PDF file. I like pdftk because it’s fast and can easily be incorporated into a Bash script in order to automate the generation of PDFs. Make sure you list the file names within the command in the order that you want them to appear within the PDF you are creating. In this example, file1.pdf, file2.pdf and file3.pdf are the PDFs you want to merge. Pdftk file1.pdf file2.pdf file3.pdf cat output combined.pdf ![]() To merge PDFs with pdftk, simply open up a terminal and run a command like this: On Ubuntu, you can do that with a simple: To use pdftk, you first need to install it. Merging PDF Files from the Command LineĮver need to combine multiple PDFs into a single PDF file? I do all the time. Some of the utilities we’ll be examining could be used on other operating systems, too, but I think they’re most powerful when you run them in a Bash shell in which you can script tasks easily. In this article, we’ll take a look at some useful tasks you can accomplish with PDF files on Linux. Few people use Linux to create or edit PDF files.īut thanks to the power of Bash scripting and Linux command-line tools like pdftk, Ghostscript and pdf2text, your Linux PC or laptop can be a very efficient environment for working with PDF files. You probably don’t think of Linux as a premier platform for editing, converting, splitting, manipulating or otherwise working with PDF files.Īfter all, Adobe Acrobat, the leading commercial platform for managing PDFs, doesn’t run natively on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |