# Class PDFCreator

java.lang.Object
javajs.export.PDFCreator

public class PDFCreator extends Object

## Constructor Summary

Constructors
Constructor
Description
`PDFCreator()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addImageResource(Object newImage, int width, int height, int[] buffer, boolean isRGB)`
`void`
`addInfo(Map<String,String> data)`
`boolean`
`canDoLineTo()`
`void`
`closeDocument()`
`void`
`doCircle(int x, int y, int r, boolean doFill)`
`void`
`doPolygon(int[] axPoints, int[] ayPoints, int nPoints, boolean doFill)`
`void`
`doRect(int x, int y, int width, int height, boolean doFill)`
`void`
`drawImage(Object image, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1)`
`void`
`drawStringRotated(String s, int x, int y, int angle)`
`void`
`fill()`
`void`
`g(String cmd)`
`String`
`getRotation(int angle)`
`void`
`lineto(int x, int y)`
`void`
`moveto(int x, int y)`
`void`
`newDocument(int paperWidth, int paperHeight, boolean isLandscape)`
`void`
`setColor(float[] rgb, boolean isFill)`
`void`
`setFont(String fname, float size)`
`void`
`setLineWidth(float width)`
`void`
`setOutputStream(OutputStream os)`
`void`
`stroke()`
`void`
`translateScale(float x, float y, float scale)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PDFCreator

public PDFCreator()

## Method Details

### setOutputStream

public void setOutputStream(OutputStream os)

### newDocument

public void newDocument(int paperWidth, int paperHeight, boolean isLandscape)

### moveto

public void moveto(int x, int y)

### lineto

public void lineto(int x, int y)

### addInfo

public void addInfo(Map<String,String> data)

### addImageResource

public void addImageResource(Object newImage, int width, int height, int[] buffer, boolean isRGB)

### g

public void g(String cmd)

### closeDocument

public void closeDocument() throws IOException

Throws:
  `IOException`

### canDoLineTo

public boolean canDoLineTo()

### fill

public void fill()

### stroke

public void stroke()

### doCircle

public void doCircle(int x, int y, int r, boolean doFill)

### doPolygon

public void doPolygon(int[] axPoints, int[] ayPoints, int nPoints, boolean doFill)

### doRect

public void doRect(int x, int y, int width, int height, boolean doFill)

### drawImage

public void drawImage(Object image, int destX0, int destY0, int destX1, int destY1, int srcX0, int srcY0, int srcX1, int srcY1)

### drawStringRotated

public void drawStringRotated(String s, int x, int y, int angle)

### getRotation

public String getRotation(int angle)

### setColor

public void setColor(float[] rgb, boolean isFill)

### setFont

public void setFont(String fname, float size)

### setLineWidth

public void setLineWidth(float width)

### translateScale

public void translateScale(float x, float y, float scale)