Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
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:
⏎ org/apache/fop/layoutmgr/RestartAtLM.java
/*
* 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,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.layoutmgr;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import org.apache.fop.events.EventBroadcaster;
/**
* Class to find the restart layoutmanager for changing IPD
*/
class RestartAtLM {
protected boolean invalidPosition;
protected LayoutManager getRestartAtLM(AbstractBreaker breaker, PageBreakingAlgorithm alg,
boolean ipdChangesOnNextPage, boolean onLastPageAndIPDChanges,
boolean visitedBefore, AbstractBreaker.BlockSequence blockList, int start) {
BreakingAlgorithm.KnuthNode optimalBreak = ipdChangesOnNextPage ? alg.getBestNodeBeforeIPDChange() : alg
.getBestNodeForLastPage();
if (onLastPageAndIPDChanges && visitedBefore && breaker.originalRestartAtLM == null) {
optimalBreak = null;
}
int positionIndex = findPositionIndex(breaker, optimalBreak, alg, start);
if (ipdChangesOnNextPage || (breaker.positionAtBreak != null && breaker.positionAtBreak.getIndex() > -1)) {
breaker.firstElementsForRestart = Collections.EMPTY_LIST;
if (ipdChangesOnNextPage) {
if (breaker.containsNonRestartableLM(breaker.positionAtBreak)) {
if (alg.getIPDdifference() > 0) {
EventBroadcaster eventBroadcaster = breaker.getCurrentChildLM().getFObj()
.getUserAgent().getEventBroadcaster();
BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider
.get(eventBroadcaster);
eventProducer.nonRestartableContentFlowingToNarrowerPage(this);
}
breaker.firstElementsForRestart = new LinkedList();
boolean boxFound = false;
Iterator iter = blockList.listIterator(positionIndex + 1);
Position position = null;
while (iter.hasNext()
&& (position == null || breaker.containsNonRestartableLM(position))) {
positionIndex++;
KnuthElement element = (KnuthElement) iter.next();
position = element.getPosition();
if (element.isBox()) {
boxFound = true;
breaker.firstElementsForRestart.add(element);
} else if (boxFound) {
breaker.firstElementsForRestart.add(element);
}
}
if (position instanceof SpaceResolver.SpaceHandlingBreakPosition) {
/* Retrieve the original position wrapped into this space position */
breaker.positionAtBreak = position.getPosition();
} else {
breaker.positionAtBreak = null;
}
}
}
}
LayoutManager restartAtLM = null;
if (ipdChangesOnNextPage || !(breaker.positionAtBreak != null && breaker.positionAtBreak.getIndex() > -1)) {
if (breaker.positionAtBreak != null && breaker.positionAtBreak.getIndex() == -1) {
Position position;
Iterator iter = blockList.listIterator(positionIndex + 1);
do {
KnuthElement nextElement = (KnuthElement) iter.next();
position = nextElement.getPosition();
} while (position == null
|| position instanceof SpaceResolver.SpaceHandlingPosition
|| position instanceof SpaceResolver.SpaceHandlingBreakPosition
&& position.getPosition().getIndex() == -1);
LayoutManager surroundingLM = breaker.positionAtBreak.getLM();
while (position.getLM() != surroundingLM) {
position = position.getPosition();
}
if (position.getPosition() == null) {
position.getLM().getFObj().setForceKeepTogether(true);
invalidPosition = true;
return null;
}
restartAtLM = position.getPosition().getLM();
}
if (onLastPageAndIPDChanges && restartAtLM != null) {
if (breaker.originalRestartAtLM == null) {
breaker.originalRestartAtLM = restartAtLM;
} else {
restartAtLM = breaker.originalRestartAtLM;
}
breaker.firstElementsForRestart = Collections.EMPTY_LIST;
}
}
if (onLastPageAndIPDChanges && !visitedBefore && breaker.positionAtBreak.getPosition() != null) {
restartAtLM = breaker.positionAtBreak.getPosition().getLM();
}
return restartAtLM;
}
private int findPositionIndex(AbstractBreaker breaker, BreakingAlgorithm.KnuthNode optimalBreak,
PageBreakingAlgorithm alg, int start) {
int positionIndex = (optimalBreak != null) ? optimalBreak.position : start;
for (int i = positionIndex; i < alg.par.size(); i++) {
KnuthElement elementAtBreak = alg.getElement(i);
if (elementAtBreak.getPosition() == null) {
elementAtBreak = alg.getElement(0);
}
breaker.positionAtBreak = elementAtBreak.getPosition();
/* Retrieve the original position wrapped into this space position */
breaker.positionAtBreak = breaker.positionAtBreak.getPosition();
if (breaker.positionAtBreak != null) {
return i;
}
}
return positionIndex;
}
}
⏎ org/apache/fop/layoutmgr/RestartAtLM.java
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 Download
⇒ "fop" Command in fop-2.7-bin.zip
2016-07-07, ≈304🔥, 0💬
Popular Posts:
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
MP3SPI is a Java Service Provider Interface that adds MP3 (MPEG 1/2/2.5 Layer 1/2/3) audio format su...
How to compare performances of various XML parsers with the jaxp\SourceValidator.jav aprovided in th...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...