}
public static String extractTextFrom(PDDocument document) throws IOException {
Writer output = new StringWriter();
PDFTextStripper stripper = new PDFTextStripper();
stripper.writeText(document, output);
return output.toString().trim();
}
public static String getDocumentMetadataValue(PDDocument document, COSName name) {
PDDocumentInformation info = document.getDocumentInformation();