in reply to Re^3: How to export all images from pdf via perl?
in thread How to export all images from pdf via perl?

As per your advice i used "extractallimages.pl -O 1 main.pdf /tmp". No error found but image not saved in the tmp path. Could you please help me to solve this problem. I installed "image magic 6.4.0-2 Q16".
And also which option is suitable for to export all images from pdf file.

Thanks,
Prabudass
  • Comment on Re^4: How to export all images from pdf via perl?

Replies are listed 'Best First'.
Re^5: How to export all images from pdf via perl?
by marto (Cardinal) on Oct 30, 2008 at 11:22 UTC

    In reverse order:

    "And also which option is suitable for to export all images from pdf file."

    I have told you previously that if you don't use the -O option all images will be saved, this is also covered in the documentation which I have asked you to read a couple of times now.

    Had you read the documentation, you may have noticed the -v (verbose) option, which will print diagnostic messages. Perhaps you could start by reading the documentation (the implication being that you understand what you are reading) and running the example again with the verbose option enabled. Are you sure that path /tmp is correct? I gave this as an example, but I notice in the first post on this topic that you are running a version of Windows.

    A big part of programming is debugging, why not look at the code for extractallimages.pl, examine what it is doing, if you have any messages generated by using the verbose option find out what is causing the problem. For example, can you replicate the call to ImageMagicks convert binary outwith this script?

    Martin

      Dear Monks,

      Thanks for your Guidence.

      Now i can export all the images from pdf using CAM::PDF.
      But the color is slightly varying from the original PDF image.
      Is there any possibility to export the original color of the image.
      Where can i modify the coding.

      Thanks in advance
      Prabudass

      Note:
      I am using extractallimages.pl

        Given that I have already explained that this script uses ImageMagicks convert command line utility to export images, perhaps you could start by looking at the part of the code which specifies which command line options are passed to convert, and experiment from there.

        Martin

      I read the documentation. I used -v but it throws the following error message.
      "extractallimages.pl -v main1.pdf \tmp"
      Image 1, (no name) = object 49, (w,h)=(524,632)
      Failed to write file /tmp/crunchjpg.5716
      Already i created "tmp" folder. I will try in various way. Please advice me.

      Prabudass
        list the reasons it could fail to write to /tmp/crunchjpg.5716