org.apache.batik.transcoder.print
public class PrintTranscoder extends SVGAbstractTranscoder implements Printable
Constructor Summary | |
---|---|
PrintTranscoder()
Constructs a new transcoder that prints images. |
Method Summary | |
---|---|
static void | handleValueError(String property, String value) |
static void | main(String[] args) |
void | print()
Convenience method |
int | print(Graphics _g, PageFormat pageFormat, int pageIndex)
Printable implementation |
protected void | setImageSize(float docWidth, float docHeight)
Sets document size according to the hints.
|
static void | setTranscoderBooleanHint(Transcoder transcoder, String property, TranscodingHints.Key key) |
static void | setTranscoderFloatHint(Transcoder transcoder, String property, TranscodingHints.Key key) |
static void | setTranscoderRectangleHint(Transcoder transcoder, String property, TranscodingHints.Key key) |
static void | setTranscoderStringHint(Transcoder transcoder, String property, TranscodingHints.Key key) |
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: |
KEY_MARGIN_BOTTOM |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page bottom margin |
Key: |
KEY_MARGIN_LEFT |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page left margin |
Key: |
KEY_MARGIN_RIGHT |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page right margin |
Key: |
KEY_MARGIN_TOP |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The print page top margin |
Key: |
KEY_PAGE_HEIGHT |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The height of the print page |
Key: |
KEY_PAGE_ORIENTATION |
---|---|
Value: |
String |
Default: |
VALUE_PAGE_ORIENTATION_PORTRAIT |
Required: |
No |
Description: |
The print page's orientation |
Key: |
KEY_PAGE_WIDTH |
---|---|
Value: |
Length |
Default: |
None |
Required: |
No |
Description: |
The width of the print page |
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: |
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: |
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. |
Parameters: docWidth Width of the document. docHeight Height of the document.
Parameters: document the document to transcode uri the uri of the document or null if any output the ouput where to transcode
Throws: TranscoderException if an error occured while transcoding