Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got a rather large (~100Mo) pdf document with lots of images in it (as illustrations and background images), and I'd like to have a copy of that pdf without images but I can't find out how to do that. I'm not talking about converting it to text only, I'd like to keep paragraphs/tables/multi-columns as they are.

I'm comfortable with command line and have several computers with different distributions that I can use.

share|improve this question
    
As we're talking about a 500 pages document with multiple images on each page, I'm looking for an automated way to remove every picture. –  Ornux Jun 6 at 14:35

3 Answers 3

up vote 4 down vote accepted
cpdf -draft original.pdf -o version_without_images.pdf

It is not in the repositories but you can find a download (pre-compiled or source) on their website.


Manual:

15.1 Draft Documents

The -draft option removes bitmap (photographic) images from a file, so that it can be printed with less ink. Optionally, the -boxes option can be added, filling the spaces left blank with a crossed box denoting where the image was. This is not guaranteed to be fully visible in all cases (the bitmap may be have been partially covered by vector objects or clipped in the original). For example:

 cpdf -draft -boxes in.pdf -o out.pdf
share|improve this answer
    
That is exactly what I was looking for. The output file is just perfect. Thank you so much! –  Ornux Jun 6 at 15:06
    
@Rinzwind Please note that the link "their website" actually goes to a zip file. –  Jos Jun 6 at 16:02
    
@jos thanks! was not intentional :D –  Rinzwind Jun 6 at 17:23

You can use master pdf editor, delete those images and save as a new pdf file. You can download it from Ubuntu software center.

share|improve this answer
    
I just installed it to try but I see no automated way to do that. Given that it is a 500 pages document, I don't see manual removal as a solution here. Did I miss something ? –  Ornux Jun 6 at 14:32
    
no you didn't miss anything i thought images are large size so you want to remove them, never thought of so many images. anyway nice question. –  Sudheer Jun 7 at 3:32

While @Rinzwind answer is the Right Thing, I would like just to comment the "midway" solution. You can normally reduce greatly the size of the images using ghostscript with

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen \
   -dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf original.pdf

...it is sometime really handy for proofreading. The manual page for writing PDF is here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.