![]() The command line can get quite crowded with those options, should you choose to use more than a couple of them. You can set the frame rate of videos and add subtitles to them, change the aspect ratio, change the quality of audio, and more. Here's an example of a simple conversion of a video from AVI to Ogg Theora: ffmpeg -i myVideo.avi myvideo.oggįFmpeg can do a lot more than that. Whereas Pandoc is the Swiss Army Knife for converting between markup languages, FFmpeg is Pandoc's opposite number for audio and video formats.įFmpeg is a set of libraries and executables that give you the ability to convert seemlessly between nearly any format. The conversion takes far less time than opening all of those files in LibreOffice Writer and doing the conversion manually. If, say, you want to convert all of the Microsoft Word documents in a folder to LibreOffice Writer format, you'd type: soffice -headless -convert-to odt *.docx However, turning to the command line is a great way to convert several files at once. Using LibreOffice at the command line to convert a single file is overkill. The -headless option, in case you're wondering, stops an empty LibreOffice window from opening on your desktop. You'd just replace pdf with the extension of whatever file format you want to convert to. How? To, for example, transform a LibreOffice Impress slide deck to PDF, you'd type the following: soffice -headless -convert-to pdf mySlides.odp But what many people don't know is that you can run LibreOffice from the command line to quickly convert one or more files. You're probably thinking, "Hold on! LibreOffice is a GUI application." Yes, it is. What happens if you have a binary file, such as a word processor document? Help at the command line comes from an unexpected source. Pandoc, however, only handles text-based files. Take a peek at Pandoc's documentation for details. You can, for example, add a table of contents, typographic quotes, custom headers, and syntax highlighting to the resulting file. You're not just limited to straight conversions. Here's how to use Pandoc for a simple conversion (in this case, from HTML to reStructuredText): pandoc -t rst myFile.html -o myFile.rst Have a file formatted with Markdown that you want to convert to a LibreOffice Writer document? How about a LaTeX document that you want to turn into an EPUB? Or maybe you have an HTML file that you want to turn into a slide deck. And for good reason: Pandoc not only does some pretty nifty conversions, it's fast, too. PandocĮveryone I know who works with markup languages says Pandoc is the go-to utility for converting between those languages. Let's take a look at three solid file conversion tools for the Linux command line. If, however, you want or need to convert between file formats, then there are a quite a few applications for the job. Chances are, you'll never see and never use most of them. That said, you've probably never heard of many of the formats that are commonly used enough to warrant listing on Wikipedia. OK, there aren't quite that many file formats. My semi-serious response was, "Think of a soup bowl filled with beach sand." Gswin32c.exe -quit -o OUT.PDF -sDEVICE=pdfwrite IN.Recently, a friend innocently asked me how many file formats there are. GhostScript has a lot of complex command-lines options and switches. Here is a tricky part: Finding out the exact command to do the conversion. To use GhostScript you need to open the command line and run the GhostScript executable ( gswin32c.exe). Using Ghostscript to Convert PostScript to PDF Inside /bin you will find the files mentioned above. So if you just want to use GhostScript without the need to install it, you can just extract gs901w32.exe using 7-Zip. All you need for GhostScript to work is the following files. But you don’t actually need to install anything. You can double-click the executable and install the program. If you’re under Windows, the file you need to download is gs901w32.exe. It’s important that you download exactly that version, since the latest version did NOT work for me. Installing Ghostscriptĭownload Ghostscript 9.01 from their website. After spending countless hours trying to figure out how to make it work, I finally got it. GhostScript is only usable through the command line and, I have to admit it, it’s hard to use. Unfortunately, it’s targeted to advanced users. Ghostscript is a great open source program that allows us to do many things, including converting PostScript files to PDF. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |