public class PdfGenerator extends Object
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
PdfGenerator.PageInfo |
Describes the metadata of a page in a PDF file.
|
static class |
PdfGenerator.PdfPage |
Defines a page in a PDF file.
|
| 构造器 | 说明 |
|---|---|
PdfGenerator() |
Default constructor used to create a
PdfGenerator instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
PdfGenerator.PdfPage |
beginDrawing(PdfGenerator.PageInfo pageInfo) |
Generates a blank page for drawing based on the specified page information.
|
void |
close() |
Closes the current PDF file.
|
void |
endDrawing(PdfGenerator.PdfPage pdfPage) |
Ends drawing.
|
void |
writeTo(OutputStream stream) |
Writes the content of a PDF file to the output stream.
|
public PdfGenerator()
PdfGenerator instance.public PdfGenerator.PdfPage beginDrawing(PdfGenerator.PageInfo pageInfo)
public void endDrawing(PdfGenerator.PdfPage pdfPage)
pdfPage - Indicates the page where to end drawing. For details, see PdfPage.public void close()
public void writeTo(OutputStream stream) throws IOException
stream - Indicates the target output stream.IOException - Throws this exception if an I/O error occurs during data writing.