in reply to PDF::API2 module prints junk characters

try
#!perl use strict; use PDF::API2; use Data::Dump 'pp'; my $file = 'file.pdf'; my $pdf = PDF::API2->open($file); my %h = $pdf->info(); pp $pdf->info; print $h{'ModDate'};
poj

Replies are listed 'Best First'.
Re^2: PDF::API2 module prints junk characters
by Anonymous Monk on Sep 01, 2015 at 10:25 UTC

    Hello poj, Thanks for your response. When I run your code, I got output like this,

    ( "ModDate", pack("H*","4a7878cbbb7bff8a4b3b937b7fe3d5e12664278a100905"), "Subject", "L\27}\xCB\xBBs\xE2\x89JN\xFDz\x7F\xE4", "CreationDate", pack("H*","4a7878cbbb75ff87493a92737eedd6ed51"), "Producer", pack("H*","4f213894e923bb9f3d62d13e23b889b179742683101717f1abd548ddd +a263b6365d adb6e92"), "Title", pack("H*","4c372697ee36a6d1593c927a7bf9d3e74e7433e96c1971b4bfd35f8eb +7063b696ed dc77288250087"), "Author", pack("H*","572d2194ec23b8de594ece2f29a097bd687450c252494da3acce5392f +9"), ) JxxË»{ÿŠK;“{ãÕá&d'Š 

    When I extracted the xmp meta file in xml format using this module, it is completely having junk characters. When I open the document properties, it is showing the modified data clearly. Any Idea?

Re^2: PDF::API2 module prints junk characters
by Anonymous Monk on Sep 01, 2015 at 11:07 UTC

    Hello Poj, I think the problem is with the PDF, some of the files throwing the date perfectly, for some files I am getting junk characters. So If you have some idea to rectify, please let me know.