Field Summary |
|
final public static String | KEY_AOI_STR |
final public static String | KEY_HEIGHT_STR |
final public static String | KEY_LANGUAGE_STR |
final public static TranscodingHints.Key | KEY_MARGIN_BOTTOM The marginBottom key. |
final public static String | KEY_MARGIN_BOTTOM_STR |
final public static TranscodingHints.Key | KEY_MARGIN_LEFT The marginLeft key. |
final public static String | KEY_MARGIN_LEFT_STR |
final public static TranscodingHints.Key | KEY_MARGIN_RIGHT The marginRight key. |
final public static String | KEY_MARGIN_RIGHT_STR |
final public static TranscodingHints.Key | KEY_MARGIN_TOP The marginTop key. |
final public static String | KEY_MARGIN_TOP_STR |
final public static TranscodingHints.Key | KEY_PAGE_HEIGHT The pageHeight key. |
final public static String | KEY_PAGE_HEIGHT_STR |
final public static TranscodingHints.Key | KEY_PAGE_ORIENTATION The pageOrientation key. |
final public static String | KEY_PAGE_ORIENTATION_STR |
final public static TranscodingHints.Key | KEY_PAGE_WIDTH The pageWidth key. |
final public static String | KEY_PAGE_WIDTH_STR |
final public static String | KEY_PIXEL_TO_MM_STR |
final public static TranscodingHints.Key | KEY_SCALE_TO_PAGE The scaleToPage key. |
final public static String | KEY_SCALE_TO_PAGE_STR |
final public static TranscodingHints.Key | KEY_SHOW_PAGE_DIALOG The showPageDialog key. |
final public static String | KEY_SHOW_PAGE_DIALOG_STR |
final public static TranscodingHints.Key | KEY_SHOW_PRINTER_DIALOG The showPrinterDialog key.
Constructor Summary | |
public | PrintTranscoder() Constructs a new transcoder that prints images. |
Method Summary | |
public static void | handleValueError(String property, String value) | public static void | main(String[] args) | public void | print() | public int | print(Graphics _g, PageFormat pageFormat, int pageIndex) | protected void | setImageSize(float docWidth, float docHeight) Sets document size according to the hints. | public static void | setTranscoderBooleanHint(Transcoder transcoder, String property, TranscodingHints.Key key) | public static void | setTranscoderFloatHint(Transcoder transcoder, String property, TranscodingHints.Key key) | public static void | setTranscoderRectangleHint(Transcoder transcoder, String property, TranscodingHints.Key key) | public static void | setTranscoderStringHint(Transcoder transcoder, String property, TranscodingHints.Key key) | public void | transcode(TranscoderInput in, TranscoderOutput out) | protected void | transcode(Document document, String uri, TranscoderOutput output) Transcodes the specified Document as an image in the specified output. |
KEY_HEIGHT_STR | final public static String KEY_HEIGHT_STR(Code) | | |
KEY_LANGUAGE_STR | final public static String KEY_LANGUAGE_STR(Code) | | |
KEY_MARGIN_BOTTOM | final public static TranscodingHints.Key KEY_MARGIN_BOTTOM(Code) | | The marginBottom key.
Key: |
KEY_MARGIN_BOTTOM |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page bottom margin |
|
KEY_MARGIN_BOTTOM_STR | final public static String KEY_MARGIN_BOTTOM_STR(Code) | | |
KEY_MARGIN_LEFT | final public static TranscodingHints.Key KEY_MARGIN_LEFT(Code) | | The marginLeft key.
Key: |
KEY_MARGIN_LEFT |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page left margin |
|
KEY_MARGIN_LEFT_STR | final public static String KEY_MARGIN_LEFT_STR(Code) | | |
KEY_MARGIN_RIGHT | final public static TranscodingHints.Key KEY_MARGIN_RIGHT(Code) | | The marginRight key.
Key: |
KEY_MARGIN_RIGHT |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page right margin |
|
KEY_MARGIN_RIGHT_STR | final public static String KEY_MARGIN_RIGHT_STR(Code) | | |
KEY_MARGIN_TOP | final public static TranscodingHints.Key KEY_MARGIN_TOP(Code) | | The marginTop key.
Key: |
KEY_MARGIN_TOP |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page top margin |
|
KEY_MARGIN_TOP_STR | final public static String KEY_MARGIN_TOP_STR(Code) | | |
KEY_PAGE_HEIGHT | final public static TranscodingHints.Key KEY_PAGE_HEIGHT(Code) | | The pageHeight key.
Key: |
KEY_PAGE_HEIGHT |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The height of the print page |
|
KEY_PAGE_HEIGHT_STR | final public static String KEY_PAGE_HEIGHT_STR(Code) | | |
KEY_PAGE_ORIENTATION | final public static TranscodingHints.Key KEY_PAGE_ORIENTATION(Code) | | The pageOrientation key.
Key: |
KEY_PAGE_ORIENTATION |
Value: |
String |
Default: |
VALUE_PAGE_ORIENTATION_PORTRAIT |
Required: |
No |
Description: |
The print page's orientation |
|
KEY_PAGE_ORIENTATION_STR | final public static String KEY_PAGE_ORIENTATION_STR(Code) | | |
KEY_PAGE_WIDTH | final public static TranscodingHints.Key KEY_PAGE_WIDTH(Code) | | The pageWidth key.
Key: |
KEY_PAGE_WIDTH |
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The width of the print page |
|
KEY_PAGE_WIDTH_STR | final public static String KEY_PAGE_WIDTH_STR(Code) | | |
KEY_PIXEL_TO_MM_STR | final public static String KEY_PIXEL_TO_MM_STR(Code) | | |
KEY_SCALE_TO_PAGE | final public static TranscodingHints.Key KEY_SCALE_TO_PAGE(Code) | | The scaleToPage key.
Key: |
KEY_SCALE_TO_PAGE |
Value: |
Boolean |
Default: |
true |
Required: |
No |
Description: |
Specifies whether or not the SVG images are scaled to
fit into the printed page |
|
KEY_SCALE_TO_PAGE_STR | final public static String KEY_SCALE_TO_PAGE_STR(Code) | | |
KEY_SHOW_PAGE_DIALOG | final public static TranscodingHints.Key KEY_SHOW_PAGE_DIALOG(Code) | | The showPageDialog key.
Key: |
KEY_SHOW_PAGE_DIALOG |
Value: |
Boolean |
Default: |
false |
Required: |
No |
Description: |
Specifies whether or not the transcoder
should pop up a dialog box for selecting
the page format. |
|
KEY_SHOW_PAGE_DIALOG_STR | final public static String KEY_SHOW_PAGE_DIALOG_STR(Code) | | |
KEY_SHOW_PRINTER_DIALOG | final public static TranscodingHints.Key KEY_SHOW_PRINTER_DIALOG(Code) | | The showPrinterDialog key.
Key: |
KEY_SHOW_PAGE_DIALOG |
Value: |
Boolean |
Default: |
false |
Required: |
No |
Description: |
Specifies whether or not the transcoder
should pop up a dialog box for selecting
the printer. If the dialog box is not
shown, the transcoder will use the default
printer. |
|
KEY_SHOW_PRINTER_DIALOG_STR | final public static String KEY_SHOW_PRINTER_DIALOG_STR(Code) | | |
KEY_USER_STYLESHEET_URI_STR | final public static String KEY_USER_STYLESHEET_URI_STR(Code) | | |
KEY_XML_PARSER_CLASSNAME_STR | final public static String KEY_XML_PARSER_CLASSNAME_STR(Code) | | |
VALUE_MEDIA_PRINT | final public static String VALUE_MEDIA_PRINT(Code) | | |
VALUE_PAGE_ORIENTATION_LANDSCAPE | final public static String VALUE_PAGE_ORIENTATION_LANDSCAPE(Code) | | |
VALUE_PAGE_ORIENTATION_PORTRAIT | final public static String VALUE_PAGE_ORIENTATION_PORTRAIT(Code) | | |
VALUE_PAGE_ORIENTATION_REVERSE_LANDSCAPE | final public static String VALUE_PAGE_ORIENTATION_REVERSE_LANDSCAPE(Code) | | |
PrintTranscoder | public PrintTranscoder()(Code) | | Constructs a new transcoder that prints images.
|
setImageSize | protected void setImageSize(float docWidth, float docHeight)(Code) | | Sets document size according to the hints.
Global variables width and height are modified.
Parameters: docWidth - Width of the document. Parameters: docHeight - Height of the document. |
transcode | protected void transcode(Document document, String uri, TranscoderOutput output) throws TranscoderException(Code) | | Transcodes the specified Document as an image in the specified output.
Parameters: document - the document to transcode Parameters: uri - the uri of the document or null if any Parameters: output - the ouput where to transcode exception: TranscoderException - if an error occured while transcoding |
|