Debian Codegraph @

freehep-graphicsio-pdf/src/main/java/org/freehep/graphicsio/pdf/PDFPageBase.java

raw
1 package org.freehep.graphicsio.pdf;
2
3 import java.io.IOException;
4
5 /**
6 * Implements the Page Base Node to accomodate Inheritance of Page Attributes
7 * (see Table 3.17)
8 * <p>
9 *
10 * @author Mark Donszelmann
11 * @version $Id: freehep-graphicsio-pdf/src/main/java/org/freehep/graphicsio/pdf/PDFPageBase.java f493ff6e61b2 2005/12/01 18:46:43 duns $
12 */
13 public abstract class PDFPageBase extends PDFDictionary {
14
15 protected PDFPageBase(PDF pdf, PDFByteWriter writer, PDFObject object,
16 PDFRef parent) throws IOException {
17 super(pdf, writer, object);
18 entry("Parent", parent);
19 }
20
21 //
22 // Inheritable items go here
23 //
24 public void setResources(String resources) throws IOException {
25 entry("Resources", pdf.ref(resources));
26 }
27
28 public void setMediaBox(double x, double y, double w, double h)
29 throws IOException {
30 double[] rectangle = { x, y, w, h };
31 entry("MediaBox", rectangle);
32 }
33
34 public void setCropBox(double x, double y, double w, double h)
35 throws IOException {
36 double[] rectangle = { x, y, w, h };
37 entry("CropBox", rectangle);
38 }
39
40 public void setRotate(int rotate) throws IOException {
41 entry("Rotate", rotate);
42 }
43 }