![]() ![]() Or if that file no longer exists when you read this paper, perform a If you can't find one, you can download this file., Obviously, you'll change your $pdfppd variable to reflect the file on your system. Grep ^*PageSize $pdfppd | cut -d " " -f 2-10 \ Pdfppd=/usr/share/ghostscript/8.15/lib/ghostpdf.ppd You will use this filename to set a variable in the script, which follows: In my case, the preceding command returned a single file, /usr/share/ghostscript/8.15/lib/ghostpdf.ppd. ppd file will probably be on your system, so use the following ppd file and outputs a list of all paper size names and their sizes. The following script (let's call it papersizes.sh) reads a You'll need paper sizes for some ghostscript ( gv)Ĭommands. In my case, I use the device named /pdfwrite to write PDFs (whoda thunkit?). Once you've viewed the list of devices, you're in a much better position to know what to do. Isn't what you want, so you split it into multiple lines with the tr command, and then sort the lines with the sort command. ![]() Interpreter's output is all devices on a single line, which of course (quiet) switch, assuring that only device names are output. The preceding pipes the command 'devicenames =' into the ghostview interpreter with the -q Here's how you see all the device names, in alphabeticalĮcho 'devicenames = ' | gs -q | tr " " "\n" | sort Some devicesĪre printer drivers, while others print to specialized files (there's a Ghostscript uses various devices to accomplish its magic. Or perhaps you need to create a multipage PDF from several single page source files. Sounds easy, but it can be ruinouslyĭifficult, requiring ghostscript ( gs). Perhaps you need to make a landscape PDF from a postscript file lacking ![]() There's a program called ps2pdf that's very easy to use:Įasy, clean, fast. I am notįor any damage or injury caused by your use of this document, or causedīy errors and/or omissions in this document. See on this page without verifying it for yourself. Page may have errors - in fact it probably does. This page is an introduction to ghostscript - not an authoritative text.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |