







JsPropertiesExtractor | Send comments on this topic. |
printToImageData Method | |
See Also Example |
![]() |
vdWebLibrary Namespace > vdrawObj Class : printToImageData Method |
- windowFlag
- Defines what part of the displayed drawing will be selected for printing. Possible parameters are PRINT_WINDOW_FLAG_EXTENTS, PRINT_WINDOW_FLAG_VIEW, PRINT_WINDOW_FLAG_ORIGINAL.
- ScaleFlag
- Defines the scale of the area that will be printed on the paper. Possible parameters are PRINT_SCALE_FLAG_FIT, PRINT_SCALE_FLAG_ORIGINAL.
- papersizeHINCH
- A two sized array defining the width and height of the paper to be used for the print job in hundreds of inches.
- MarginHINCH
- A number defining the printer's margin on every side of the paper in hundreds of inches.
- bkcolor
- A four sized array defining the background's color. The first element if for Red, second for Green, third for Blue and fourth for Alpha.
- frameWidth
- The width of the border defining the paper size in the resulted image data, in pixels.If it is greater than zero(0) then a border will be drawn around the paper with forground color.
- resolution
- The resolution to be used for the image export. It overrides the printer's resolution.
JScript | |
---|---|
public function printToImageData( windowFlag : int, ScaleFlag : int, papersizeHINCH : Object, MarginHINCH : Object, bkcolor : Object, frameWidth : int, resolution : int ) : String; |
Parameters
- windowFlag
- Defines what part of the displayed drawing will be selected for printing. Possible parameters are PRINT_WINDOW_FLAG_EXTENTS, PRINT_WINDOW_FLAG_VIEW, PRINT_WINDOW_FLAG_ORIGINAL.
- ScaleFlag
- Defines the scale of the area that will be printed on the paper. Possible parameters are PRINT_SCALE_FLAG_FIT, PRINT_SCALE_FLAG_ORIGINAL.
- papersizeHINCH
- A two sized array defining the width and height of the paper to be used for the print job in hundreds of inches.
- MarginHINCH
- A number defining the printer's margin on every side of the paper in hundreds of inches.
- bkcolor
- A four sized array defining the background's color. The first element if for Red, second for Green, third for Blue and fourth for Alpha.
- frameWidth
- The width of the border defining the paper size in the resulted image data, in pixels.If it is greater than zero(0) then a border will be drawn around the paper with forground color.
- resolution
- The resolution to be used for the image export. It overrides the printer's resolution.
Return Value
An array of image data in string format.See also our print dialog example on http://vdraw.com/javascript-examples/print-dialog/
C# | ![]() |
---|---|
var dataUrl = vdcanvas.printToImageData(vdConst.PRINT_WINDOW_FLAG_VIEW, vdConst.PRINT_SCALE_FLAG_FIT, new Array(830, 1170), 10, Array(255, 255, 255, 255), 2); |