Link Search Menu Expand Document

Root.HardCopy Property

Explanation Output a hard copy (screen capture) of the screen to the printer.

In addition to the screen image, supplementary information for hard copy printing can be added.
Hardcopy is always printed from the printer. It cannot be output to the preview screen or image file.
Added since Ver.4.0.0

You can get a hardcopy as an Image object instead of printing by specifying a special virtual printer for the printer name.
Added since Ver.5.0.3
Not supported in Mobile, AI
Call format //.HardCopy( [ mode [ , option [ , comment [ , printer ] ] ] ] )
OR</br>var img = //.HardCopy( mode, 0, “”, “@image” )
Added since Ver.5.0.3
Return value None
Arguments integer mode Select the print target from the following.
Constant Value Description
$ HC_FORM 0 Print the Form object of the Root object .
Window frames and title bars are not printed.
$ HC_WINDOW 1 Print the Biz / Browser window as it is.
Window borders and titles are also printed.
If it is running in Internet Explorer , it will behave the same as $ HC_FORM .
$ HC_DESKTOP 2 Prints the entire desktop.
$ HC_DIALOG 3 Prints the single dialog at the top.
The behavior is undefined when the dialog is not displayed.
Added since Image
Not supported in ImageImage

If mode is omitted, the operation will be $ HC_FORM.
integer option Specify the supplementary information to be included in the print in the following combination.
Constant Value Description
HC_VERSION 1 Print the version information of Biz / Browser .
$ HC_INFO 2 Print the Windows version and computer name.
$ HC_DATE 4 Print the current date and time.
$ HC_COMMENT 8 Print the comment. The comment body is specified by comment .
If you do not specify $ HC_COMMENT, the comment will not be printed.


Also, select the orientation of the paper to print from the following.
Constant Value Description
$ HC_VERTICAL 256 Print vertically
$ HC_HORIZONTAL 512 Print horizontally

If you do not specify the paper orientation, it will be the default orientation of the printer.

If you omit the option or specify 0, no supplemental information is printed and the paper orientation is the printer's default orientation.

When specifying multiple supplementary information, add and specify as follows.
    //.HardCopy($HC_a 
String comment Specify the comment to be printed as a supplement to the hard copy.
This is valid only when $ HC_COMMENT is specified for option.
String printer Specify the output destination printer name. The printer name can be obtained with the getPrinterList function.

If a blank character string or null is specified for printer, the printer selection dialog is displayed. The user can select any printer.

If printer is omitted, it will be output to the normally used printer set in Biz / Browser. The default printer for Biz / Browser is set with the setDefaultPrinter function.

The following parameters can be specified since Ver.5.0.3
By specifying "@image" as a special printer name, the result of hard copy can be obtained as an Image object by the return value of the method.
Exception PKG-39 Cannot output to preview printer
PKG-40 Ended error
PKG-41 Printer not found
PKG-42 The printer could not be opened
PKG-43 Could not start printer job
PKG-44 Insufficient memory
Example of use
    //.HardCopy($HC_FORM, $HC_VERSION + $HC_COMMENT, "TEST", null);
    
Related item