aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/DataStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/afp/DataStream.java')
-rw-r--r--src/java/org/apache/fop/afp/DataStream.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/afp/DataStream.java b/src/java/org/apache/fop/afp/DataStream.java
index a437c3004..2794ae932 100644
--- a/src/java/org/apache/fop/afp/DataStream.java
+++ b/src/java/org/apache/fop/afp/DataStream.java
@@ -595,7 +595,13 @@ public class DataStream {
* byte data
*/
public void createNoOperation(String content) {
- currentPage.createNoOperation(content);
+ if (currentPage != null) {
+ currentPage.createNoOperation(content);
+ } else if (currentPageGroup != null) {
+ currentPageGroup.createNoOperation(content);
+ } else {
+ document.createNoOperation(content);
+ }
}
/**
@@ -639,9 +645,9 @@ public class DataStream {
currentPageGroup.endPageGroup();
tleSequence = currentPageGroup.getTleSequence();
document.addPageGroup(currentPageGroup);
- document.writeToStream(outputStream);
currentPageGroup = null;
}
+ document.writeToStream(outputStream); //Flush objects
}
/**