-
Apr7
PDF Compress out from Nautilus
Filed under: Thoughts;No Comments
Other day I was again in the situation that I had to submit PDF documents, which could not exceed a maximum file size. No idea who this has been covered, but keep a job application, including all scanned products is under 3MB to have been severely limited. Well, with Ghostscript can be the relatively simple task, but the command is required for this very bulky.But with an additional script for Nautilus PDFs can easily reduce the file manager in size.View
Before I get to the script, I'll briefly discuss the underlying Ghostscript command. In principle, you can tell Ghostscript that it will open a PDF and then save it again with new settings. Most important is inter alia the option “PDFSETTINGS” will be determined by their place in which the predefined quality issue …
$ Gs-sDEVICE = pdfwrite-dCompatibilityLevel = 1.4 dPDFSETTINGS = / ebook-dNOPAUSE dQUIET-dBATCH-sOutputFile = output.pdf input.pdf
… Ghostscript knows PDFSETTINGS for the following settings. Get more information on gs and his command over her example Ghostcript the PDF Reference & Tips by Milan Kupcevic.
/ screen:Screen-view only quality, 72 dpi images/ ebook:Low quality, 150 dpi images/ printer:High quality, 300 dpi images/ prepress:High quality, preserving color, 300 dpi imgsDefault /:Almost identical to screen /
Is now the command to remember anything but convenient and easy. It could indeed hide behind an alias, but why when consuming it but also an easy way? The file manager, Nautilus, the GNOME desktop environment itself can execute scripts created and there is where Compress PDF.
Little script is based on the above command and packed it all into a simple GUI Zenity. So you can a PDF file in Nautilus choose to start the script and then compress the file according to your wishes. For the “installation” of Zenity, Ghostscript and Compress PDF you must do the following.
$ Sudo apt-get install libnotify-bin ghostscript zenity$ Cd ~ / .gnome2/nautilus-scripts$ Wget http://launchpad.net/compress-pdf/1.x/1.4/+download/Compress-PDF-1.4.tar.gz$ Tar-zxvf *. tar.gz PDF Compress Compress PDF & & rm *. tar.gzThen you find
Compress PDF from the context menu of Nautilus. Please note that the result is not always better. With good parameters created PDF files can often no longer shrink much. And brings the reduction is also a loss of quality with it. Checks whether the resulting file so the quality is still adequate for your purposes.
Nevertheless
Can often achieve tremendous savings. Reducing the file size by half is almost normal, some of the smaller of my PDFs were smaller by a factor of four.
I have the script also need to quickly translated into German and sent to the supervisor of the project Ricardo Ferreira. Until he has built and the newly released, the German version you can download over linuxundich.de. Once the new version is out, I delete these sections out of the post.
.
