Java Multivalent Library: how to extract metadata from PDF
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hanamichi_SAKURAGI
Posted On:   Wednesday, January 11, 2006 06:59 PM

Hi! I try to extract text & Metadada from a PDF by Multivalent Library. My problem is that i have some problem with the metadata extraction. The code is something like this: public static String getMeta (File file) throws Exception { String buf; String r; ExtractText extracttext = new ExtractText(); buf = extracttext.extract(file.toURI()); Document meta = new Document(buf,null, null); r=meta.getAttr(Document.ATTR_AUTHOR); System.out.println(r); r=meta.getAttr(Document.ATTR_GENRE); System.out.println(r); r=meta.getAttr(Document.ATTR_PAGE); System.out.println(r); r=meta.getAttr(Document.ATTR_TITLE); System   More>>

Hi!
I try to extract text & Metadada from a PDF by Multivalent Library.
My problem is that i have some problem with the metadata extraction. The code is something like this:


			
public static String getMeta (File file) throws Exception {


String buf;
String r;
ExtractText extracttext = new ExtractText();
buf = extracttext.extract(file.toURI());
Document meta = new Document(buf,null, null);

r=meta.getAttr(Document.ATTR_AUTHOR);
System.out.println(r);
r=meta.getAttr(Document.ATTR_GENRE);
System.out.println(r);
r=meta.getAttr(Document.ATTR_PAGE);
System.out.println(r);
r=meta.getAttr(Document.ATTR_TITLE);
System.out.println(r);

return buf;

}



All println return a "null" value...

Any suggestion?
Tnx

   <<Less

Re: Java Multivalent Library: how to extract metadata from PDF

Posted By:   Hanamichi_SAKURAGI  
Posted On:   Wednesday, January 11, 2006 07:06 PM

Sry double post, delete this
About | Sitemap | Contact