What Is fop.jar in fop-2.7-bin.zip

What Is fop.jar? I got it from the fop-2.7-bin.zip.

✍: FYIcenter.com

fop.jar in fop-2.7-bin.zip is the JAR file for FOP 2.7, which is a print formatter driven by XSL formatting objects (XSL-FO). You can obtain fop.jar from the build folder of the fop-2.7-bin.zip file.

Below is the information about the fop.jar (2.2) file:

JAR File Size and Download Location:

JAR name: fop.jar, fop-2.7.jar
Target JDK version: 1.7
File name: fop.jar
File size: 4442817 bytes
Release date: 20-Jan-2022
Download: Apache FOP Website

Java source code files for fop.jar:


 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *      http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

/* $Id: ListItemContentLayoutManager.java 1835810 2018-07-13 10:29:57Z ssteiner $ */

package org.apache.fop.layoutmgr.list;

import java.util.LinkedList;
import java.util.List;
import java.util.Stack;

import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
import org.apache.fop.fo.flow.AbstractListItemPart;
import org.apache.fop.fo.flow.ListItemBody;
import org.apache.fop.fo.flow.ListItemLabel;
import org.apache.fop.fo.properties.KeepProperty;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
import org.apache.fop.layoutmgr.BreakOpportunity;
import org.apache.fop.layoutmgr.Keep;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.NonLeafPosition;
import org.apache.fop.layoutmgr.Position;
import org.apache.fop.layoutmgr.PositionIterator;
import org.apache.fop.layoutmgr.SpaceResolver.SpaceHandlingBreakPosition;
import org.apache.fop.layoutmgr.TraitSetter;

 * LayoutManager for a list-item-label or list-item-body FO.
public class ListItemContentLayoutManager extends BlockStackingLayoutManager implements BreakOpportunity {

    private Block curBlockArea;

    private int xOffset;
    // private int itemIPD; // FIXME: never written!

     * Create a new Cell layout manager.
     * @param node list-item-label node
    public ListItemContentLayoutManager(ListItemLabel node) {

     * Create a new Cell layout manager.
     * @param node list-item-body node
    public ListItemContentLayoutManager(ListItemBody node) {

     * Convenience method.
     * @return the ListBlock node
    protected AbstractListItemPart getPartFO() {
        return (AbstractListItemPart)fobj;

     * Set the x offset of this list item.
     * This offset is used to set the absolute position
     * of the list item within the parent block area.
     * @param off the x offset
    public void setXOffset(int off) {
        xOffset = off;

     * Add the areas for the break points.
     * The list item contains block stacking layout managers
     * that add block areas.
     * @param parentIter the iterator of the break positions
     * @param layoutContext the layout context for adding the areas
    public void addAreas(PositionIterator parentIter,
                         LayoutContext layoutContext) {


        LayoutManager childLM;
        LayoutContext lc = LayoutContext.offspringOf(layoutContext);
        LayoutManager firstLM = null;
        LayoutManager lastLM = null;
        Position firstPos = null;
        Position lastPos = null;

        // "unwrap" the NonLeafPositions stored in parentIter
        // and put them in a new list;
        LinkedList<Position> positionList = new LinkedList<Position>();
        Position pos;
        while (parentIter.hasNext()) {
            pos = parentIter.next();
            if (pos == null) {
            if (pos.getIndex() >= 0) {
                if (firstPos == null) {
                    firstPos = pos;
                lastPos = pos;
            if (pos instanceof NonLeafPosition) {
                // pos was created by a child of this ListBlockLM
                lastLM = pos.getPosition().getLM();
                if (firstLM == null) {
                    firstLM = lastLM;
            } else if (pos instanceof SpaceHandlingBreakPosition) {
            } else {
                // pos was created by this ListBlockLM, so it must be ignored

        registerMarkers(true, isFirst(firstPos), isLast(lastPos));

        PositionIterator childPosIter = new PositionIterator(positionList.listIterator());
        while ((childLM = childPosIter.getNextChildLM()) != null) {
            // Add the block areas to Area
            lc.setFlags(LayoutContext.FIRST_AREA, childLM == firstLM);
            lc.setFlags(LayoutContext.LAST_AREA, childLM == lastLM);
            // set the space adjustment ratio
            childLM.addAreas(childPosIter, lc);

        registerMarkers(false, isFirst(firstPos), isLast(lastPos));


        curBlockArea = null;


     * Return an Area which can contain the passed childArea. The childArea
     * may not yet have any content, but it has essential traits set.
     * In general, if the LayoutManager already has an Area it simply returns
     * it. Otherwise, it makes a new Area of the appropriate class.
     * It gets a parent area for its area by calling its parent LM.
     * Finally, based on the dimensions of the parent area, it initializes
     * its own area. This includes setting the content IPD and the maximum
     * BPD.
     * @param childArea the child area to get the parent for
     * @return the parent area
    public Area getParentArea(Area childArea) {
        if (curBlockArea == null) {
            curBlockArea = new Block();
            // set position
            // FIXME - itemIPD is never written!

            TraitSetter.setProducerID(curBlockArea, getPartFO().getId());

            // Set up dimensions
            Area parentArea = parentLayoutManager.getParentArea(curBlockArea);
            int referenceIPD = parentArea.getIPD();
            // Get reference IPD from parentArea
            setCurrentArea(curBlockArea); // ??? for generic operations
        return curBlockArea;

     * Add the child to the list item area.
     * @param childArea the child to add to the cell
    public void addChildArea(Area childArea) {
        if (curBlockArea != null) {
            curBlockArea.addBlock((Block) childArea);

    /** {@inheritDoc} */
    public KeepProperty getKeepTogetherProperty() {
        return getPartFO().getKeepTogether();

    /** {@inheritDoc} */
    public Keep getKeepWithNext() {
        return Keep.KEEP_AUTO;

    /** {@inheritDoc} */
    public Keep getKeepWithPrevious() {
        return Keep.KEEP_AUTO;

    /** {@inheritDoc} */
    public List getNextKnuthElements(LayoutContext context, int alignment, Stack lmStack,
            Position restartPosition, LayoutManager restartAtLM) {
        List<ListElement> elements = new LinkedList<ListElement>();
        do {
            elements.addAll(super.getNextKnuthElements(context, alignment, lmStack, restartPosition,
        } while (!isFinished());
        return elements;



Or download all of them as a single archive file:

File name: fop-2.7-src.zip
File size: 3401312 bytes
Release date: 2022-01-20


"fop" Command in fop-2.7-bin.zip

What Is fop-2.7-bin.zip

Download and Installing of FOP 2.x

⇑⇑ FAQ for FOP (Formatting Object Processor)

2016-07-07, 6404👍, 0💬