Package org.apache.fop.apps

Examples of org.apache.fop.apps.FOPException


     */
    public void createID(String id) throws FOPException
    {
        if ( id!=null && !id.equals("") ) {
            if ( doesIDExist(id) ) {
                throw new FOPException("The id \""+id+"\" already exists in this document");
            }
            else {
                createNewId(id);
                removeFromIdValidationList(id);                
            }
View Full Code Here


  }
  return pret;
      } catch (org.apache.fop.fo.expr.PropertyException propEx) {
  MessageHandler.errorln("Error in " + propName + " property value '"
             + value + "': " + propEx);
  throw new FOPException("Property error");
      }
    }
View Full Code Here

    // flowname checking is more stringient for static content currently
    protected void setFlowName(String name)
  throws FOPException
    {
  if (name == null || name.equals("")) {
      throw new FOPException("A 'flow-name' is required for "+getElementName()+".");
   }
  else {
      super.setFlowName(name);
  }
 
View Full Code Here

            }
        }

        if (fobjMaker == null) {
            if (namespaces.containsKey(namespaceURI.intern())) {
                  throw new FOPException(FONode.errorText(locator)
                      + "No element mapping definition found for "
                      + FONode.getNodeString(namespaceURI, localName), locator);
            } else {
                log.warn("Unknown formatting object " + namespaceURI + "^" + localName);
                fobjMaker = new UnknownXMLObj.Maker(namespaceURI);
View Full Code Here

    // this means that children can get the fontstate
    areaCurrent.setPage(area.getPage());

    int numChildren = this.children.size();
    if(numChildren > 1) {
        throw new FOPException("Only one child element is allowed in an instream-foreign-object");
    }
    /* layout foreign object */
    if(this.children.size() > 0) {
      FONode fo = (FONode) children.elementAt(0);
      Status status;
View Full Code Here

    if (textDecoration == TextDecoration.UNDERLINE) {
        this.underlined = true;
    }

    if (parent.getName().equals("fo:flow")) {
      throw new FOPException("fo:inline can't be directly"
                   + " under flow");
    }

  }
View Full Code Here

                  if (i + 2 < args.length) {
                      String name = args[++i];
                      String expression = args[++i];
                      addXSLTParameter(name, expression);
                  } else {
                    throw new FOPException("invalid param usage: use -param <name> <value>");
                  }
            } else if (args[i].equals("-o")) {
                i = i + parsePDFOwnerPassword(args, i);
            } else if (args[i].equals("-u")) {
                i = i + parsePDFUserPassword(args, i);
View Full Code Here

    }    // end parseOptions

    private int parseConfigurationOption(String[] args, int i) throws FOPException {
        if ((i + 1 == args.length)
                || (args[i + 1].charAt(0) == '-')) {
            throw new FOPException("if you use '-c', you must specify "
              + "the name of the configuration file");
        } else {
            userConfigFile = new File(args[i + 1]);
            return 1;
        }
View Full Code Here

    }

    private int parseLanguageOption(String[] args, int i) throws FOPException {
        if ((i + 1 == args.length)
                || (args[i + 1].charAt(0) == '-')) {
            throw new FOPException("if you use '-l', you must specify a language");
        } else {
            Locale.setDefault(new Locale(args[i + 1], ""));
            return 1;
        }
    }
View Full Code Here

    }

    private int parseResolution(String[] args, int i) throws FOPException {
        if ((i + 1 == args.length)
                || (args[i + 1].charAt(0) == '-')) {
            throw new FOPException(
                    "if you use '-dpi', you must specify a resolution (dots per inch)");
        } else {
            this.targetResolution = Integer.parseInt(args[i + 1]);
            return 1;
        }
View Full Code Here

TOP

Related Classes of org.apache.fop.apps.FOPException

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.