Package org.apache.fop.apps

Examples of org.apache.fop.apps.FOPException


   
    public void addFlow(Flow flow)
  throws FOPException
    {
  if (_flowMap.containsKey(flow.getFlowName())) {
      throw new FOPException("flow-names must be unique within an fo:page-sequence");
  }
  if (!this.layoutMasterSet.regionNameExists(flow.getFlowName())) {
      MessageHandler.errorln("WARNING: region-name '"+flow.getFlowName()+"' doesn't exist in the layout-master-set.");
  }
  _flowMap.put(flow.getFlowName(), flow);
View Full Code Here


    // a legal alternative is to use the last sub-sequence
    // specification which should be handled in getNextSubsequence. That's not done here.
        if ( pageMaster == null )
        {
    throw new FOPException("page masters exhausted. Cannot recover.");
        }
        return pageMaster.makePage(areaTree);
    }
View Full Code Here

  } else { // otherwise see if there's a simple master by the given name
      SimplePageMaster simpleMaster =
    this.layoutMasterSet.getSimplePageMaster( pageSequenceName );
      if (simpleMaster == null) {
    throw new FOPException( "'master-name' for 'fo:page-sequence'" +
          "matches no 'simple-page-master' or 'page-sequence-master'" );
      }
      currentPageMasterName = pageSequenceName;
     
      pageMaster = simpleMaster.getNextPageMaster();
View Full Code Here

        try {
            renderer.setupFontInfo(fontInfo);
            // check that the "any,normal,400" font exists
            if (!fontInfo.isSetupValid()) {
                throw new FOPException(
                    "No default font defined by OutputConverter");
            }
            renderer.startRenderer(stream);
        } catch (IOException e) {
            throw new FOPException(e);
        }
    }
View Full Code Here

        if (parent.getName().equals("fo:root")) {
            this.root = (Root)parent;
            root.setLayoutMasterSet(this);
        } else {
            throw new FOPException("fo:layout-master-set must be child of fo:root, not "
                                   + parent.getName());
        }
        allRegions = new Hashtable();

    }
View Full Code Here

    protected void addSimplePageMaster(SimplePageMaster simplePageMaster)
            throws FOPException {
        // check against duplication of master-name
        if (existsName(simplePageMaster.getMasterName()))
            throw new FOPException("'master-name' ("
                                   + simplePageMaster.getMasterName()
                                   + ") must be unique "
                                   + "across page-masters and page-sequence-masters");
        this.simplePageMasters.put(simplePageMaster.getMasterName(),
                                   simplePageMaster);
View Full Code Here

    protected void addPageSequenceMaster(String masterName, PageSequenceMaster pageSequenceMaster)
            throws FOPException {
        // check against duplication of master-name
        if (existsName(masterName))
            throw new FOPException("'master-name' (" + masterName
                                   + ") must be unique "
                                   + "across page-masters and page-sequence-masters");
        this.pageSequenceMasters.put(masterName, pageSequenceMaster);
    }
View Full Code Here

                Region region = (Region)e.nextElement();
                if (allRegions.containsKey(region.getRegionName())) {
                    String localClass =
                        (String)allRegions.get(region.getRegionName());
                    if (!localClass.equals(region.getRegionClass())) {
                        throw new FOPException("Duplicate region-names ("
                                               + region.getRegionName()
                                               + ") must map "
                                               + "to the same region-class ("
                                               + localClass + "!="
                                               + region.getRegionClass()
View Full Code Here

                                       + "a page-master-name and so is being ignored");
            } else {
                this.layoutMasterSet.addPageSequenceMaster(pm, this);
            }
        } else {
            throw new FOPException("fo:page-sequence-master must be child "
                                   + "of fo:layout-master-set, not "
                                   + parent.getName());
        }
    }
View Full Code Here

                this.properties.get("white-space-collapse").getEnum();

            this.refId = this.properties.get("ref-id").getString();

            if (this.refId.equals("")) {
                throw new FOPException("page-number-citation must contain \"ref-id\"");
            }

            // create id
            this.id = this.properties.get("id").getString();
            idReferences.createID(id);
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.