The easiest command to compress pdf file

We use pdftk here, pdftk stands for PDF toolkits, is a cross-platform tool for manipulating PDF files.

How to install pdftk?

$ sudo pkg install pdftk # on FreeBSD
$ sudo apt-get install pdftk # on Debian / Ubuntu based GNU/Linux

How to compress PDF via pdftk?

$ pdftk input.pdf output output.pdf compress

You can also decompress by replacing ‘compress’ keyword with ‘uncompress’

$ pdftk input.pdf output output.pdf uncompress

That’s all. Notes that the compression usually works with images only, may not work on the file only contains text and simple shapes.

簡易反轉 PDF 顏色和把 PDF 轉成圖檔的方法

這篇要用的工具是 ImageMagick (wiki)

imagemagick 是一套不管是在 Linux, FreeBSD, Windows 或 Mac OS X 上都很容易取得的工具,其主要功能是各種圖檔的檢視、編輯、轉換

FreeBSD 安裝: $ sudo pkg install ImageMagick
Debian / Ubuntu based GNU/Linux 安裝: $ sudo apt-get install imagemagick
CentOS / Fedora based GNU/Linux 安裝: $ sudo yum install ImageMagick
Mac OS X 使用 MacPorts 安裝: $ sudo port install ImageMagick
Mac OS X 使用 Homebrew 安裝: $ brew install imagemagick

嫌版本太舊、或是上面沒提到、還是沒有套件管理功能的作業系統請自己從這邊找:http://imagemagick.org/script/binary-releases.php

安裝完 ImageMagick 後會有一個 convert 的 command 可以用

閱讀全文

Adobe Reader on Linux

因為 Ubuntu 系列 GNU/Linux 預設的 Document Reader 滿好用的 (我很喜歡他內建顏色反轉的功能),一直沒發現原來 Adobe 有出 for linux 的 PDF Reader,而且內心隱約也覺得不會有這種東西,直到昨天看到這篇 Adobe Pulls Linux PDF Reader Downloads From Website,才發現原來 Adobe 有出 Linux client … 而且 deb 跟 rpm 的 package 都有提供,意味著大多數的 GNU/Linux distrobutions 都可以使用,有點驚訝啊…

順手裝起來試試看,畫面大概就長這樣:

希望不要跟 Windows 版一樣會出現一些相容性比 3-party reader 還差的情形…
(有遇過某些檔案用 Chrome/Firefox 內建 PDF reader 讀取沒問題,用 Adobe reader 跟Acrobat 會出錯的,而且出錯的頁數跟狀況還不一樣=_=|||)

PS: 下載位置:
ftp://ftp.adobe.com/pub/adobe/reader/unix/