Package org.exoplatform.services.document

Examples of org.exoplatform.services.document.DocumentReadException


         {
            pdDocument = PDDocument.load(is);
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can not load PDF document.", e);
         }

         PDFTextStripper stripper = new PDFTextStripper();
         stripper.setStartPage(1);
         stripper.setEndPage(Integer.MAX_VALUE);
View Full Code Here


         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         doc = docBuilder.parse(new ByteArrayInputStream(metadata));
      }
      catch (SAXException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      catch (ParserConfigurationException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }

      // Check is there PDF/A-1 XMP
      String version = "";
      NodeList list = doc.getElementsByTagName("pdfaid:conformance");
View Full Code Here

            }
         }
      }
      catch (ParseException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      return props;
   }
View Full Code Here

         {
            pdDocument = PDDocument.load(is);
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can not load PDF document.", e);
         }

         PDFTextStripper stripper = new PDFTextStripper();
         stripper.setStartPage(1);
         stripper.setEndPage(Integer.MAX_VALUE);
View Full Code Here

         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         doc = docBuilder.parse(new ByteArrayInputStream(metadata));
      }
      catch (SAXException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      catch (ParserConfigurationException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }

      // Check is there PDF/A-1 XMP
      String version = "";
      NodeList list = doc.getElementsByTagName("pdfaid:conformance");
View Full Code Here

            }
         }
      }
      catch (ParseException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      return props;
   }
View Full Code Here

         {
            ppe = new XSLFPowerPointExtractor(OPCPackage.open(is));
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (OpenXML4JRuntimeException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (OpenXML4JException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (XmlException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         return ppe.getText(true, true);
      }
      finally
      {
View Full Code Here

      {
         reader.readDCProperties(new XSLFSlideShow(OPCPackage.open(is)));
      }
      catch (InvalidFormatException e)
      {
         throw new DocumentReadException("Can't read properties from OOXML document", e);
      }
      catch (OpenXML4JException e)
      {
         throw new DocumentReadException("Can't read properties from OOXML document", e);
      }
      catch (XmlException e)
      {
         throw new DocumentReadException("Can't read properties from OOXML document", e);
      }
      return reader.getProperties();
   }
View Full Code Here

         {
            doc = new XWPFDocument(is);
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open message.", e);
         }
         catch (OpenXML4JRuntimeException e)
         {
            throw new DocumentReadException("Can't open message.", e);
         }

         XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
         text = extractor.getText();
      }
View Full Code Here

         {
            ppe = new PowerPointExtractor(is);
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         return ppe.getText(true, true);
      }
      finally
      {
View Full Code Here

TOP

Related Classes of org.exoplatform.services.document.DocumentReadException

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.