import java.util.Iterator;
import java.util.Map;
import com.lowagie.text.pdf.PdfReader;
public class MainClass {
public static void main(String[] args) throws Exception {
PdfReader reader = new PdfReader("HelloWorldToRead.pdf");
if (reader.getMetadata() == null) {
System.out.println("No XML Metadata.");
} else {
System.out.println("XML Metadata: " + new String(reader.getMetadata()));
}
}
}