Main Menu

PDF Custom properties

Started by sumit07, October 15, 2012, 08:12:05 AM

Previous topic - Next topic

sumit07

Hi Phil
Sorry to bug u but I am talking about how to retrieve it using code not cmd line

Phil Harvey

Sorry, I didn't understand.

use Image::ExifTool qw(:Public);
my $info = ImageInfo('image.jpg', 'XMP-namespace:all');


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sumit07

Hi Phil,

Is there any way to validate Pdf using exiftool or see if the xref table is valid

Thanks,
Sumit

Phil Harvey

Hi Sumit,

ExifTool is not a validation tool, but it will report some errors/warnings that you can retrieve like this:

exiftool -error -warning FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sumit07

Hi Phil

I am trying to add custom properties to a pdf, but it says invalid xref. could you plz help me with this

-sumit

Phil Harvey

If you can send me the PDF (philharvey66 at gmail.com), I'll take a look.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sumit07

Hi Phil.

I  have send the mail and also attached the file in this commnet . Please have a look.

-sumit

Phil Harvey

Hi Sumit,

Thanks for the sample.  ExifTool was not parsing the XREF table of this PDF properly.  This problem will be fixed in ExifTool 9.21, which will likely be released tomorrow.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sumit07

Hi Phil,

We are using the perl module Image::Exiftool for reading and writing pdf properties.
Will this update be available in this module too ?


-sumit

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sumit07

Hi Phil,


This works like a charm. Thanks a lot again :)

-sumit