aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2011-10-24 12:44:11 +0000
committerJeremias Maerki <jeremias@apache.org>2011-10-24 12:44:11 +0000
commit54a4751b616ab4e8957b97af4088bd725367ea6f (patch)
tree56289b094baf9f253c927d7a3a570e7b061dfc85 /examples
parentae7c3b4bd8c7e1eca36dd5963d2b28dfad43bda2 (diff)
downloadxmlgraphics-fop-54a4751b616ab4e8957b97af4088bd725367ea6f.tar.gz
xmlgraphics-fop-54a4751b616ab4e8957b97af4088bd725367ea6f.zip
Allow to switch to a different page size in mid-document.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1188123 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples')
-rw-r--r--examples/embedding/java/embedding/ExampleJava2D2PDF.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/embedding/java/embedding/ExampleJava2D2PDF.java b/examples/embedding/java/embedding/ExampleJava2D2PDF.java
index ff9807165..907aaeab5 100644
--- a/examples/embedding/java/embedding/ExampleJava2D2PDF.java
+++ b/examples/embedding/java/embedding/ExampleJava2D2PDF.java
@@ -116,7 +116,8 @@ public class ExampleJava2D2PDF {
g2d.setFont(new Font("serif", Font.PLAIN, 36));
g2d.drawString("Hello world!", 140, 180);
- g2d.nextPage();
+ pageSize = new Dimension(pageSize.height, pageSize.width);
+ g2d.nextPage(pageSize.width, pageSize.height);
//Demonstrate painting rich text
String someHTML = "<html><body style=\"font-family:Verdana\">"