2012. december 29.

Small size Color PDF

After years of struggling with color PDF-s, I realized today that color PS exists, which lead to a fast solution on the given problem.

Here's how it goes:

  1. GSCAN2PDF
    scan image
    on 8-bit depth and 300 dpi resolution.
    save in PNM file format.
    this results in an approx. 20MB size file.
  2. CONVERT
    resize
    to 50%
    convert bigimg.pnm -resize 50% smallimg.pnm
    file size abt. 5MB
  3. PNMTOPS
    convert to ps
    pnmtops -equalpixels smallimg.pnm > smallimg.ps
    file size abt. 10MB
  4. PS2PDF
    convert to pdf
    ps2pdf12 smallimg.ps smallimg.pdf
    */Sadly, I could not manage to have the pdf cropped to the proper size with ps2pdf, so I have to do it manually in the next step. However if You know the solution to this problem do not hold back on sharing it with me!/*
    file size abt. 200KB
  5. PDFCROP
    crop pdf of unnecessary margin
    pdfcrop smallimg.pdf
    (resulting in smallimg-crop.pdf)
    final file size abt. 200KB
This is how you do a good quality color pdf from good quality large images.

...And a couple months later (19 May 2013) I realized that my method of producing black-and-white pdfs, which I use since years, is just as good to produce color pdfs as the above or even better because with the old method I do not have to use pdfcrop, ad the pdf page size of the color cover will be compatible with the b&w pages...

Nincsenek megjegyzések: