Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

[OT:] Properties of images in pdf

by Anonymous Monk
on Dec 02, 2018 at 15:34 UTC ( #1226625=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, sorry for OT, but you are my only parish. Given, there is a pdf file created from several jpg-images: is there a way to extract the properties of those images - e.g. creating application, creating date etc. (of those images, not of pdf itself)? Thank you very much and sorry again for bothering!

Replies are listed 'Best First'.
Re: [OT:] Properties of images in pdf
by LanX (Archbishop) on Dec 02, 2018 at 21:01 UTC
    As a pragmatic approach:

    I seem to remember that Image::Magick was capable of extracting image files from pdf.

    Once extracted maybe try to use the usual means to get the metadata you need?

    HTH! :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      CAM::PDF (and likely others) can extract images, which doesn't mean that that they necessarily have the desired metadata embedded in them, that depends on the tools used to create the jpg and the PDF, and the options selected.

Re: [OT:] Properties of images in pdf
by bliako (Vicar) on Dec 03, 2018 at 16:33 UTC

    Extract the images from PDF and if you are lucky, their metadata would have been retained*. Then use Image::ExifTool to see image metadata, possibly in-memory.

    *) The PDF creator (e.g. a word-processor) might try to be clever and ask user to apply compression on input images which may filter out metadata or enable user to filter out metadata themselves.

      Thank you all!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1226625]
Approved by LanX
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2019-12-08 23:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found