LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Pasting into GIMP (https://www.linuxquestions.org/questions/slackware-14/pasting-into-gimp-4175611540/)

aikempshall 08-08-2017 02:08 AM

Pasting into GIMP
 
I have an annoying feature in GIMP which I would like to find a solution to.


To copy an image from a pdf using Adobe Reader 9.5.5 and paste it into GIMP. I believe I should be able to do the following -
  1. Open the pdf document with Adobe Reader 9.5.5
  2. left click on any image in the pdf file to select the image
  3. right click to reveal the context menu with just one entry called "Copy Image"
  4. left click on the context menu option "Copy Image"
  5. Open GIMP
  6. Use the Menu Option in GIMP Edit -> Paste

However, when I do that a GIMP message box pops up telling me that "There is no image data in the clipboard to paste."

As a work around to this problem I use LibreOffice as a half way house. I do the following -
  1. Open the pdf document with Adobe Reader 9.5.5
  2. left click on any image in the pdf file to select the image
  3. right click to reveal the context menu with just one entry called "Copy Image"
  4. left click on the context menu option "Copy Image"
  5. Open LibreOffice Writer
  6. Use the Menu Option in LibreOffice Edit -> Paste. The image is successfully pasted into the Writer document
  7. Use the Menu Option in LibreOffice Edit -> Copy.
  8. Open GIMP
  9. Use the Menu Option in GIMP Edit -> Paste. The image is successfully pasted into GIMP

In the above solution I would like to circumvent the LibreOffice step. It would appear from my research that my system may have two clipboard managers which may not be synchronised. In summary I can

Copy image from pdf -> Paste Image into LibreOffice -> Copy Image from LibreOffice -> Paste image into GIMP

but cannot

Copy image from pdf -> Paste image into GIMP

Can anyone shed any light on what's going wrong with my system and how I can fix it?

Thanks to all

trollog 08-08-2017 02:39 AM

gpm is the other cut & paste daemon. /etc/rc.d/rc.gpm is the file that starts/stops it.
It should be on almost by default. Hilight and object or text in a document, then middle
mouse click to paste while the thing you want to copy is still hilighted

I mention it by way of information. Gimp uses classic old CTRL+C and CTRL+V for cut and
paste in my experience. You might try zooming the image in the pdf to the size you desire,
and then just use gimp to make a screenshot of the window. File --> Create --> Screenshot.
Crop the extraneous window decorations, and there you are- you image is imported into gimp
and can be pasted as you like. No need for third parties to get involved.

I have no idea what adobe's or pdf's abilties are these days for cut & paste. It wasn't able to
do this last I checked, but I admit, it has been a while since I needed .pdf for much. I've always
found pdf to be rather bizarre, conceptually. A platform for making documents that recipients can't edit.
Just what the world needed.

Mark Pettit 08-08-2017 03:03 AM

Quote:

Originally Posted by trollog (Post 5745850)
I've always
found pdf to be rather bizarre, conceptually. A platform for making documents that recipients can't edit.
Just what the world needed.

I might be wrong this, but I think that's EXACTLY what the world does need .. but hasn't got. There are plenty of editors around that can modify pdf.

Didier Spaier 08-08-2017 04:25 AM

if a command line tool can fit in your workflow, try pdfimages, shipped in the poppler package. man pdfimages will tell you how to use it.

trollog 08-08-2017 06:25 AM

>>I think that's EXACTLY what the world does need .. but hasn't got. There are plenty of editors around that can modify pdf. <<

Exactly. Pdf just made editing a PITA without really delivering on the unmodifiable part of the concept. Also smells a bit like DRM, to be honest, but that's another story. I stand by my "bizarre" remark.. for several reasons. Missing the target being but one of them.

upnort 08-08-2017 09:40 AM

Quote:

Can anyone shed any light on what's going wrong with my system and how I can fix it?
If you think you have two clipboard managers running, then that could be the problem. Could be a quirk with Adobe Reader, which hasn't been supported in Linux for years. Could be a clipboard manager config quirk. For example, I recall the Xfce clipboard manager has some kind of config option related to how copy/paste operations function.

As far as work-arounds, I opened a PDF in Atril, which is the default document viewer for the MATE desktop. I was able to "right-click" copy and paste an image directly from Atril into GIMP. Perhaps then try a different document viewer other than Reader?

Another option is LibreOffice has decent support for PDFs. In the process you described, you could eliminate one of the steps by opening the PDF directly in LibreOffice rather than Reader. Select the desired image, copy, and then paste into GIMP. I just tested this with the same PDF.

Diantre 08-08-2017 12:47 PM

Another option/workaround would be to open the pdf directly in GIMP, and import the page containing the image.

Richard Cranium 08-08-2017 03:04 PM

Quote:

Originally Posted by Diantre (Post 5746090)
Another option/workaround would be to open the pdf directly in GIMP, and import the page containing the image.

That's what I do.

Ztcoracat 08-08-2017 07:33 PM

Quote:

Originally Posted by Richard Cranium (Post 5746142)
That's what I do.

Me too.;)

brobr 08-09-2017 04:57 PM

Quote:

Originally Posted by aikempshall (Post 5745840)
.. copy an image from a pdf using Adobe Reader 9.5.5 and paste it into GIMP.

I bet the very first copy/paste works and then it doesn't.... unless you restart adobe reader and reload the pdf from scratch for copying the second image.... etc (sigh)

That's the cycle I had to go through for a while until I found ways round adobe reader (and wanted complete x64 and get away from multi-lib): either directly load the pdf-page in inkscape (where I usually use the copied stuff) and isolate the wanted bit and remove everything else. Otherwise use evince as the middleman instead of adobe reader; from there you can also copy images....

orbea 08-09-2017 06:53 PM

I really suggest to use xpdf or mupdf instead of adobe pdf reader... You can also use zathura with either poppler or mupdf as the backend.

aikempshall 05-09-2021 04:20 AM

Quote:

Originally Posted by brobr (Post 5746500)
I bet the very first copy/paste works and then it doesn't.... unless you restart adobe reader and reload the pdf from scratch for copying the second image.... etc (sigh)

Exactly right that's what happens.

Apologies for resurrecting this old thread which I started back in 2017.

Same problem happens with gimp 2.10.24 in Current

aikempshall 05-09-2021 04:34 AM

This post contained inaccurate information, so i've withdrawn it

bitfuzzy 05-09-2021 05:29 AM

Quote:

Originally Posted by Ztcoracat (Post 5746207)
Me too.;)

Me as well

Regnad Kcin 05-09-2021 09:12 AM

I have gradually migrated from adobe tools to okular. It is a pain to get adobe reader running in Linux but it is possible and I used acroread because i was familiar with Adobe since the '80s. Okular has a quick and simple no-nonsense copy tool that copies either text or graphics to the clipboard and works great with gimp and libreoffice. I dont have okular running in windows so i am forced to use the adobe tools and am well acquainted with the superiority of okular for my use in --current.


All times are GMT -5. The time now is 09:55 AM.