Package com.dotcms.repackage.org.apache.pdfbox.pdmodel

Examples of com.dotcms.repackage.org.apache.pdfbox.pdmodel.PDDocument


    else if (fileExt.equals(".pdf")) {
      try {
        PDFParser parser = new PDFParser(fis);
        parser.parse();

            PDDocument pdDoc= parser.getPDDocument();

        StringWriter stringWriter = new StringWriter();

        PDFTextStripper stripper = new PDFTextStripper();
        stripper.setLineSeparator("\n");
        stripper.writeText(pdDoc, stringWriter);

        text = stringWriter.toString();

        stringWriter.close();
        pdDoc.close();
      }
      catch (Exception e) {
        _log.error(e.getMessage());
      }
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.pdfbox.pdmodel.PDDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.