WR BLOB TO PRINT SETTINGS
version 2004.2
WR BLOB TO PRINT SETTINGS (area; printSettings{; paramType})
Parameter | Type | Description | |
area | Longint | 4D Write area | |
printSettings | BLOB | BLOB containing the print settings | |
paramType | Longint | 0 = layout and print, 1 = print |
Description
The WR BLOB TO PRINT SETTINGS command replaces the current print settings of the 4D Write area by those contained in the printSettings BLOB.
The area can be an external window, an included area or an offscreen area. However, because of the mechanisms managing 4D Write print settings, this command cannot be used for all the areas by passing 0 to the area parameter.
The printSettings BLOB must have been generated by the WR Print settings to BLOB command (or the 4D Pack AP Print settings to BLOB command).
printSettings contains two types of settings:
• Layout parameters (paper, orientation, scale);
• Print parameters as such (number of copies, paper source, etc.).
Note: Under Windows, the settings stored in the BLOB include the printer.
In the paramType parameter, you can pass one of the following constants, found in the "WR Parameters" theme:
Constants (value) | Description |
wr layout and print settings (0) | The print and layout settings are used |
wr print settings only (1) | Only the print settings are used |
The new print settings are applied to the document present in the area.
Note: Print settings are not formatted in the same way under Windows and Mac OS. Consequently, the compatibility of the printSettings BLOB between the two platforms is not guaranteed.
See Also
System Variables or Sets
The system variable OK is set to 1 if the BLOB has been loaded correctly and 0 if not.
Error Handling
If no printer is selected, the error 1014 is generated. If the printSettings BLOB does not contain valid print settings, the error 1074 is generated.