4D v16.3

Print settings to BLOB

Home

 
4D v16.3
Print settings to BLOB

Print settings to BLOB 


 

Print settings to BLOB ( printSettings ) -> Function result 
Parameter Type   Description
printSettings  BLOB in Current print settings
Function result  Longint in Status code: 1=Operation successful, 0=No current printer

The Print settings to BLOB command saves the current 4D print settings in the printSettings BLOB. The printSettings parameter stores all the settings used for printing:

  • Layout parameters such as paper, orientation, scale, etc.
  • Print parameters such as number of copies, paper source, etc.

This command must be used in conjunction with the BLOB to print settings command. These commands allow you to save a user's current print settings and reload them subsequently so that users will not need to specify their parameters each time they start a print job. In addition, it allows you to save "private" printer settings (specific to the printer driver) that are not available as standard printing parameters.

The BLOB generated must not be modified by programming; it can only be used by the BLOB to print settings command.

The command returns 1 if the BLOB has been generated correctly, and 0 if no current printer is selected.

The printSettings BLOB can be saved and read on both platforms. However, even if some print settings are common, some others are platform-specific and depend on the drivers and system versions. If the same printSettings BLOB is shared between both platforms, you may lost information parts.
When used in an heterogeneous environment, in order to restore the maximum settings available for each platform (and not only the common part), it is recommended that you handle two printSettings BLOBs, one for each platform.

Example  

You want to store the current print settings to disk:

 C_BLOB(curSettings)
 PRINT SETTINGS //displays print settings dialog to the user
 If(OK=1)
    $err:=Print settings to BLOB(curSettings)
    If($err=1)
       BLOB TO DOCUMENT(Get 4D folder+"current4Dsettings.blob";curSettings)
    Else
       ALERT("No selected printer")
    End if
 End if



See also 


BLOB to print settings

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 1433

This command has platform-specific behaviorThis command has platform-specific behavior

 
HISTORY 

New
Created: 4D v16

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)