Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: PDF::API2 module prints junk characters

by poj (Abbot)
on Sep 01, 2015 at 10:17 UTC ( [id://1140637]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1140637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found