1 package org.freehep.graphicsio.pdf;
2
3 import java.io.IOException;
4
5
6
7
8
9
10
11
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
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 }