Show PDF Information
Every PDF document has some Meta Information like Title, Author Name, Creation Date etc. Aspose.Pdf.Kit allows developers to control this meta information.
To show meta information of the PDF documents, we use PdfFileInfo class by calling its constructor that takes the input PDF file name as string argument. Then developers can display the meta information through properties ( Title Author CreationDate Creator Keywords ModDate Producer Header NumberOfPages and Title 0) of Title 1 class.
Every PDF document has some Meta Information like Title, Author Name, Creation Date etc. Aspose.Pdf.Kit allows developers to control this meta information.
To show meta information of the PDF documents, we use PdfFileInfo class by calling its constructor that takes the input PDF file name as string argument. Then developers can display the meta information through properties ( Title Author CreationDate Creator Keywords ModDate Producer Header NumberOfPages and Title 0) of Title 1 class.
[Java]
PdfFileInfo fileInfo = new PdfFileInfo(inFile); System.out.println("TITLE: " + fileInfo.getTitle()); System.out.println("AUTHOR:" + fileInfo.getAuthor()); System.out.println("CREATIONDATE:" + fileInfo.getCreationDate()); System.out.println("CREATOR:" + fileInfo.getCreator()); System.out.println("KeyWORDS:" + fileInfo.getKeywords()); System.out.println("MODDATE:" + fileInfo.getModDate()); HashMap header = fileInfo.getHeader(); Object[] headerKeys = header.keySet().toArray(); for (int hIndex = 0; hIndex < headerKeys.length; hIndex++) { System.out.println(headerKeys[hIndex].toString() + ":" + header.get(headerKeys[hIndex].toString())); }
