1

I'm traying to extract images from a PDF with pdfimages. The last time I used it I had no problems, but now I can't do the job.

When I run

pdfimages archive.pdf .

and I try ls in the folder where the pdf is located, I get nothing. With ls -a I found hidden files like .-000.ppm

Why is pdfimages producing such an output? How can I get again the images?

1
  • I did the same thing. The command ran for a while and seemed to work but there was no output. The command help output is quite ambiguous and I'm sure that using . is a common issue. Commented Mar 12, 2024 at 2:20

2 Answers 2

4

The manpage to pdfimages says

pdfimages [options] PDF-file image-root

So, your command

pdfimages archive.pdf .

instructs pdfimages to create the output files with filenames starting with a . - and this is exactly what happened, only that such filenames happen to have a special meaning in Unix/Linux.

You can either re-run the command with a more conventient value for the image-root parameter, or rename the (involuntarily) hidden files, which should still contain the correct output (i.e. the extracted images).

1
  • Thanks AdminBee, problem fixed. Commented Jun 4, 2020 at 9:54
1

Have a look at the pdfimages manpage. The second parameter "image-root" is a prefix. You told pdfimages to prefix the extracted images with a dot. They are images totally valid filenames, albeit hidden. You can proceed to use them as they are.

1
  • Ok thanks Hermann, I fixed the problem. I used the dot because I thought the last argument was the location of the folder where the I wanted to extract the images. Commented Jun 4, 2020 at 9:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.