LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   why doesn't copy image work in Adobe Acrobat reader? (http://www.linuxquestions.org/questions/linux-software-2/why-doesnt-copy-image-work-in-adobe-acrobat-reader-762271/)

garydale 10-15-2009 11:33 PM

why doesn't copy image work in Adobe Acrobat reader?
 
This isn't exactly a Linux question, because it also happens with the Windows version, but I've got a pdf file with a number of images in it. When I try to copy the image, it works except the pasted image is just a blank rectangle.

I've tried this with The Gimp on Linux and Windows, Photoshop Elements on Windows, and some other programs. I get similar results from all of them. Sometimes the rectangle is transparent, sometimes black, but never the image I've selected. However the rectangle does appear to be the size of the selected image, so something is being picked up.

Any ideas on what the problem may be? Does PDF have some copy protection function or am I missing something?

neonsignal 10-16-2009 04:55 AM

Quote:

why doesn't copy image work in Adobe Acrobat reader?
Yes, you are correct, the security settings in the document can be used to prevent copying of images (though my observation is that this actually prevents the image being selected at all).

When the document images are not secured, the copying of images works as you would expect (eg, using acroread and copying to gimp).

Another possibility is that you are trying to copy a vector image into a raster program?

knudfl 10-16-2009 05:35 AM

May be just create a "screenshot" of the image ?

ImageMagick provides the command 'import', which
includes a 'cross hair' for precise cut's.

This script will do it :
Code:

#! /bin/bash
 import screen$RANDOM.jpg;
 
 exit 0;

or
Code:

#! /bin/bash
 import screen.jpg; kuickshow screen.jpg;
 
 mv screen.jpg image$RANDOM.jpg
 
 exit 0;

'kuickshow' can be replaced with your favorite image viewer.
.....

garydale 10-16-2009 08:54 AM

Quote:

Originally Posted by neonsignal (Post 3721391)
Yes, you are correct, the security settings in the document can be used to prevent copying of images (though my observation is that this actually prevents the image being selected at all).

When the document images are not secured, the copying of images works as you would expect (eg, using acroread and copying to gimp).

Another possibility is that you are trying to copy a vector image into a raster program?

Unfortunately not. The images are product photos that I need to extract and resize for the company's web site. It should have been a simple select image, copy and create new image from clipboard. For some reason, it's not.

The image is selectable. If I click on it with the select tool active, I get a box drawn around the image with a pale, transparent fill over the image. Right-clicking gives me the option of copying the image. Switching to Gimp and I can create a new image from the clipboard that matches the size of the image I copied.

I can do the same with other PDFs (in this case, created with OpenOffice.org writer) and it works, so I guess there's an issue with this particular PDF. Possibly the person who created it covered the actual image with a transparent image to prevent copying - which he shouldn't have done, the images and the pdf belong to the company - or the tool he used (probably another Adobe product) does something weird.

Thanks.

garydale 10-16-2009 09:06 AM

Quote:

Originally Posted by knudfl (Post 3721434)
May be just create a "screenshot" of the image ?

ImageMagick provides the command 'import', which
includes a 'cross hair' for precise cut's.

This script will do it :
Code:

#! /bin/bash
 import screen$RANDOM.jpg;
 
 exit 0;

or
Code:

#! /bin/bash
 import screen.jpg; kuickshow screen.jpg;
 
 mv screen.jpg image$RANDOM.jpg
 
 exit 0;

'kuickshow' can be replaced with your favorite image viewer.
.....

Actually, the simplest way (which most PDF viewers support) is to scale the image so it almost fills the screen (to get the maximum resolution) then use whatever graphic select tool your pdf viewer provides to select the image. After that it's cut and paste.

The problem with both techniques is you're working with a rendering of the image. Since the image in the PDF is likely a reasonably high resolution so it prints well, you may lose some of its pixels (e.g. the embedded image could be 300dpi and 4" tall. That would make it 1200 pixels in that dimension. Your screen may be only 1024 pixels high. So not only do you have to shrink the displayed image from its actual height but the onscreen rendering is doing some interpolation to map the image's pixels to the screen). I prefer starting with the best image quality and cut and paste of screen images doesn't give me that.

It also takes more steps and requires more clean up since it includes text, background colours, etc..

neonsignal 10-16-2009 09:13 AM

If the file is not secured, then you may be able to use pdfimages to extract the original (raw) images from the file. It is part of the xpdf package.

Code:

pdfimages -j file.pdf imageprefix

garydale 10-16-2009 01:13 PM

Quote:

Originally Posted by neonsignal (Post 3721635)
If the file is not secured, then you may be able to use pdfimages to extract the original (raw) images from the file. It is part of the xpdf package.

Code:

pdfimages -j file.pdf imageprefix

Score another win for Linux! pdfimages extracted 27 images, half of which were inverse silhouettes. It looks like the person who created the PDF used a transparent overlay to create a halo around each product photo. I can't quite figured out how that translated into the fully transparent images I was copying from Reader 9, but I've got the original photos now.

Thanks!


All times are GMT -5. The time now is 06:55 PM.