PDFをグレースケールに
カラーのドキュメントをグレーに変換し、テキストは検索できるまま残します。
このツールはブラウザーの中だけで動きます。ファイルがアップロードされることはなく、そのことはブラウザーのネットワークタブでご自身で確認できます。 ご自分で確かめてください。ブラウザーのネットワークタブを開いて見てください。残りの作業回数を尋ねる小さなリクエストが1つだけ表示されます。ツール名とハッシュだけで、ファイルは決して含まれません。
このツールでできること
There is no way to recolour a PDF's vector content inside a browser - the colour lives in every content stream, in whichever of five colour spaces the producer chose. So this tool says plainly how it works: each page is re-rendered in grey and the document is rebuilt from the resulting images. The pages stop being vector as a result. The words do not stop being words: the text is read out first and drawn back invisibly over each image, so the document is still selectable and searchable.
The usual reason is printing. Colour pages cost several times what grey ones do on most office and copy-shop tariffs, and many print accounting systems bill by what the file contains rather than by what the driver was set to. It is also a straightforward way to shrink a colour scan.
仕組み
- Drop the PDF onto this page. Files up to 300 MB are accepted.
- Set the resolution. 150 dpi is the default and reads well on screen; raise it towards 300 dpi for a document that will be printed and examined closely.
- Leave Keep text searchable on unless you have a reason not to - it costs a little size and keeps the document usable.
- Adjust the JPEG quality under advanced options if the default of 82 per cent is softer or larger than you want.
- Press Convert to grayscale. Progress shows which page is being rendered, and the result reports the resolution used.
The conversion uses Rec. 709 luma rather than the average of the red, green and blue channels. The eye is roughly three times more sensitive to green than to red and ten times more than to blue, so averaging makes a saturated red and a saturated blue come out as the same middle grey when one should be clearly darker. Weighting the channels the way vision does keeps coloured text, chart series and highlighted rows distinguishable after the colour is gone.
Keeping the text searchable is what separates this from printing to an image. Before any page is replaced, PDF.js extracts every text run with its position and size; those runs are then drawn over the finished image in an invisible rendering mode. You can select a paragraph, search for a phrase and copy a table out of the result, even though what you are looking at is a picture.
The file will not always get smaller. A colour scan usually shrinks substantially, because three channels become one and the JPEG has less to encode. A text document made of vector glyphs frequently grows, sometimes several times over, because a page of crisp type is cheaper to store as instructions than as a picture of itself. If your goal is size rather than colour, Compress PDF is the tool to reach for.
Because the pages are rebuilt from images, what sits on top of them does not survive: links stop being clickable, form fields stop being fillable, and comments, highlights and stamps are gone rather than drawn in. If you need the marks kept as marks, flatten the document first and convert afterwards.
Rendering happens on your device with PDF.js and a canvas, and the rebuild with pdf-lib - both in Web Workers, neither over a network. This is the heaviest tool in the category on a large file, and it is still local: a 300-page colour report is rendered page by page in your own browser.
このツールにできないこと
- The output is images, not vector pages. Zooming in far enough shows the pixels, and the type is no longer infinitely sharp.
- A text-heavy document can come out larger than the original, because a page of type stores more cheaply as instructions than as a picture.
- Links, form fields and annotations are not carried over, since each page is replaced by an image of itself.
よくある質問
- 印刷ダイアログでグレースケールを選ぶのではなく、ファイル自体を変換するのはなぜですか?
- 印刷ダイアログで変わるのは、その1台のその1回の印刷だけだからです。印刷店・共有プリンター・ファイルを開いた同僚は、それぞれ自分で設定を決めますし、印刷の課金システムの多くは、ドライバーの設定に関係なくファイルに色が含まれていればカラー扱いで課金します。ドキュメント自体を変換すれば、一度で決着します。
- 画質はどのくらい落ちますか?
- 色は完全に失われ、ページは選んだ解像度の画像になります。150 dpiなら画面で問題なく読め、印刷も実用的です。300 dpiなら印刷品質ですが、ファイルは4倍ほどになります。どちらの場合もテキストのレイヤーは保持されます。
- ファイルは小さくなりますか?
- カラーのスキャンなら、たいてい大きく減ります。テキスト中心のドキュメントはむしろ増えることが多く、文字をJPEGに描き込むほうが、その文字を描くための命令よりも容量を食うためです。どちらの結果も変換前後のサイズとして表示されるので、思っていたものと違えば元のファイルを残しておけます。
- 変換後もテキストを検索したり選択したりできますか?
- 「テキストを検索できるまま残す」がオンなら、できます。ページを差し替える前にテキストを取り出し、画像の上に見えない状態で描き直すので、選択・検索・コピーはそのまま使えます。元がテキストのレイヤーを持たないスキャンだった場合は残すものがないので、先に「PDFをOCR」を実行してください。
- 描画のためにドキュメントはアップロードされますか?
- いいえ。各ページはお使いのブラウザーの中でPDF.jsがキャンバスに描画し、Web Worker上のpdf-libが組み直します。何も送信されないので、速度はどこかの順番待ちではなく、お使いの端末の性能で決まります。