![]() It runs on any Linuxdistribution, or any other operating system that supports Java. JoinPDF is a Java utility - to use it, you needversion 1.4 of the Java Runtime Environment installed. JoinPDF compresses the output file it generates while writing this article, I used with joinPDF to merge various combinations offiles of various sizes, and each time, the resulting PDF file was several kilobytes toseveral tens of kilobytes smaller than the total sizes of the source files. To use joinPDF you type something like this:ĭepending on how many PDF files you’re combining and their sizes, joinPDF onlytakes a few seconds to merge them. To run it, you only need to specify at the command line the name of the output file and the files that you want to combine. It’s a simple but elegant little utility that consists of a script (named joinPDF) and a compiled Java file. If you want a no-muss, no-fuss way of joining two or more PDF files together,look no further than joinPDF. On top of that, some people may find typing long strings of options at the command line to be a bit of a chore. Unless you use Ghostscript’s PDF options, the utility produces a barebones merged PDF file, and a large one at that, because by default Ghostscript doesn’t compress PDF files. Using Ghostscript has its drawbacks, too. If you don’t have it on your computer, it’s easy to download and install it. The biggest advantage to Ghostscript is that it’s a standard part of many Linux distributions. See the Ghostscript documentation for more information. For example, you can compress the file, target it to an eBook reader, or encrypt it. When using Ghostscript to combine PDF files, you can add any PDF-relatedoption to the command line. -sOutputFile=finished.pdf - tells Ghostscript to save the combined PDF file with the name that you specified.-sDEVICE=pdfwrite - tells Ghostscript to use its built-in PDF writer to process the files.-q - stops Ghostscript from displaying messages while it works.-dNOPAUSE - forces Ghostscript to process each page without pausing for user interaction.If you don’t include this option, Ghostscript will just keep running -dBATCH - once Ghostscript processes the PDF files, it should exit.Unless you’re very familiar with Ghostscript, that string of commands won’t mean much to you. Gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile= file2.pdf To use Ghostscript to combine PDF files, type something like the following: It’s a popular tool among Linux users, but what many people don’t know is that Ghostscript is also a powerful tool for combining PDF files. 4.Ghostscript is a package that enables you to view or print PostScript and PDF files to other formats, or to convert those files to other formats. From this list, we can supply those to the -sDEVICE option to generate the respective formatted output. To get the list of devices, we can run gs -h command. This tool is capable of writing the output in different formats using the supported output devices. -sOutputFile: pass the name for the final output file.-sDEVICE: selects the output device for saving to a pdf file.-dNOPAUSE: disables prompting after processing each file. ![]() -dBATCH: instructs to exit after processing all files.Lets check the different parameters used: And it’ll have all the pages from simple*.pdf files. rw-r-r- 1 bluelake bluelake 60748 Jan 10 12:59 simple3.pdfįrom the above results, we can see that the command has generated a merged.pdf file. rw-r-r- 1 bluelake bluelake 84948 Jan 10 13:27 merged.pdf $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=merged.pdf simple1.pdf simple2.pdf simple3.pdf
0 Comments
Leave a Reply. |