public class TextDevice extends Device implements IMultiPageDevice
| Modifier and Type | Field and Description |
|---|---|
static String |
EMIT_ERRORS |
static String |
EMIT_WARNINGS |
DEFAULT_SIZE, VERSION| Constructor and Description |
|---|
TextDevice() |
| Modifier and Type | Method and Description |
|---|---|
void |
closePage()
Makes necessary preparation of the device after page has been rendered.
|
Device |
create()
Creates a copy of this device.
|
void |
dispose()
Disposes the device.
|
void |
drawString(String str,
float x,
float y)
Draws a string at given point.
|
void |
endDocument()
Makes necessary preparation of device after the document has been rendered.
|
int |
getCurrentPageNumber()
Gets current page number.
|
List<String> |
getPages() |
String |
getText() |
String |
getText(int startPage,
int endPage) |
void |
initPageNumbers()
Initializes numbers of pages to render.
|
boolean |
isDirectRGB()
Indicates whether device uses direct RGB mode, that is RGB.
|
boolean |
openPage(float width,
float height)
Makes necessary preparation of the device before page rendering.
|
boolean |
openPage(String title)
Makes necessary preparation of the device before page rendering.
|
void |
renew()
Reset device to initial state for whole document.
|
void |
reset()
Reset the device to initial state for a page.
|
void |
reset(boolean zeroPageNumbers) |
void |
setSize(Dimension size)
Specifies size of page.
|
void |
startDocument()
Makes necessary preparation of device before start rendering of document.
|
String |
toString()
Returns the name of device type.
|
void |
updatePageParameters(IMultiPageDevice device)
Updates page parameters from other multi-paged device.
|
void |
writeWarning(String warning)
Writes out a warning, by default to System.err.
|
draw, drawArc, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawPolyline, drawRect, drawRoundRect, fill, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, getBackground, getCharTM, getCreator, getFont, getOpacity, getOpacityMask, getPaint, getProperties, getProperty, getPropertyColor, getPropertyDouble, getPropertyInt, getPropertyMargins, getPropertyMatrix, getPropertyRectangle, getPropertySize, getSaveOptions, getSize, getStroke, getTextRenderingMode, getTextStrokeWidth, getTransform, initClip, isMainDocument, isProperty, renewForMerge, rotate, rotate, scale, setBackground, setCharTM, setClip, setCreator, setFont, setOpacity, setOpacityMask, setPaint, setProperties, setSaveOptions, setStroke, setTextRenderingMode, setTextStrokeWidth, setTransform, shear, transform, translate, writeComment, writeStringpublic static final String EMIT_WARNINGS
public static final String EMIT_ERRORS
public void renew()
DeviceReset device to initial state for whole document. Used for reseting output stream.
public void startDocument()
DeviceMakes necessary preparation of device before start rendering of document.
startDocument in class Devicepublic void endDocument()
DeviceMakes necessary preparation of device after the document has been rendered.
endDocument in class Devicepublic void dispose()
DeviceDisposes the device.
public void setSize(Dimension size)
DeviceSpecifies size of page.
public boolean isDirectRGB()
DeviceIndicates whether device uses direct RGB mode, that is RGB.
isDirectRGB in class Devicepublic void reset()
DeviceReset the device to initial state for a page.
public void reset(boolean zeroPageNumbers)
public void initPageNumbers()
IMultiPageDeviceInitializes numbers of pages to render.
initPageNumbers in interface IMultiPageDevicepublic boolean openPage(String title)
IMultiPageDeviceMakes necessary preparation of the device before page rendering.
openPage in interface IMultiPageDevicetitle - The page title.public boolean openPage(float width,
float height)
IMultiPageDeviceMakes necessary preparation of the device before page rendering.
openPage in interface IMultiPageDevicewidth - A width of the page.height - A height of the page.public void closePage()
IMultiPageDeviceMakes necessary preparation of the device after page has been rendered.
closePage in interface IMultiPageDevicepublic int getCurrentPageNumber()
IMultiPageDeviceGets current page number.
getCurrentPageNumber in interface IMultiPageDevicepublic void updatePageParameters(IMultiPageDevice device)
IMultiPageDeviceUpdates page parameters from other multi-paged device.
updatePageParameters in interface IMultiPageDevicedevice - Another instance of the same device.public void drawString(String str, float x, float y)
DeviceDraws a string at given point.
drawString in class Devicestr - A string to be drawn.x - X coordinate of point.y - Y coordinate of point.public String toString()
DeviceReturns the name of device type.
public void writeWarning(String warning)
DeviceWrites out a warning, by default to System.err.
warning - to be writtenpublic String getText()
public String getText(int startPage, int endPage)
Copyright © 2025 Aspose. All Rights Reserved.