Examples of DocumentPage


Examples of org.pdfsam.guiclient.dto.DocumentPage

  /**
   * @param pageNode
   * @return given a page dom4j node it returns a DocumentPage object
   */
  public static DocumentPage getDocumentPage(Node pageNode) {
    DocumentPage retVal = null;
    try {
      if (pageNode != null) {
        retVal = new DocumentPage();

        Node deletedNode = (Node) pageNode.selectSingleNode("@deleted");
        if (deletedNode != null && deletedNode.getText().length() > 0) {
          retVal.setDeleted(Boolean.valueOf(deletedNode.getText()));
        }

        Node numberNode = (Node) pageNode.selectSingleNode("@number");
        if (numberNode != null && numberNode.getText().length() > 0) {
          retVal.setPageNumber(Integer.valueOf(numberNode.getText()));
        }

        Node rotationNode = (Node) pageNode.selectSingleNode("@rotation");
        if (rotationNode != null && rotationNode.getText().length() > 0) {
          retVal.setRotation(Rotation.getRotation(Integer.valueOf(rotationNode.getText())));
        }

      }
    } catch (Exception e) {
      log.warn(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
View Full Code Here

Examples of org.pdfsam.guiclient.dto.DocumentPage

        }
        List<DocumentPage> template = null;
        List<Node> pages = arg0.selectNodes("source/page");
        if(pages!=null && pages.size()>0){
          for(Node pageNode : pages){
            DocumentPage currentPage = XmlUtility.getDocumentPage(pageNode);
            if(currentPage != null){
              if(template==null){
                template = new ArrayList<DocumentPage>();
              }
              template.add(currentPage);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.