Set this parameter to true if you want to enable the pre-rasterization, otherwise set it to false. The default value is false.
Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / PrintSetPreRasterization Method

PrintSetPreRasterization Method (GdPicturePDF)

In This Topic
Enables or disables the pre-rasterization parameter which specifies whether the pages of the currently loaded PDF document must be pre-rasterized before being printed using the active printer. Enabling the pre-rasterization can dramatically improve the performance with printer drivers non-optimized for vector graphics rendering.

You can also define the rendering resolution using the PrintSetPreRasterizationDPI method when pre-rasterization is enabled.

Syntax
'Declaration
 
Public Function PrintSetPreRasterization( _
   ByVal PreRasterization As Boolean _
) As GdPictureStatus
public GdPictureStatus PrintSetPreRasterization( 
   bool PreRasterization
)
public function PrintSetPreRasterization( 
    PreRasterization: Boolean
): GdPictureStatus; 
public function PrintSetPreRasterization( 
   PreRasterization : boolean
) : GdPictureStatus;
public: GdPictureStatus PrintSetPreRasterization( 
   bool PreRasterization
) 
public:
GdPictureStatus PrintSetPreRasterization( 
   bool PreRasterization
) 

Parameters

PreRasterization
Set this parameter to true if you want to enable the pre-rasterization, otherwise set it to false. The default value is false.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Example
Enabling the pre-rasterization option to speed up the print process.
Using gdpicturePDF As New GdPicturePDF()
    gdpicturePDF.LoadFromFile("document_to_print.pdf", False)
    'Enabling the pre-rasterization option.
    gdpicturePDF.PrintSetPreRasterization(True)
    'Setting the pre-rasterization DPI.
    gdpicturePDF.PrintSetPreRasterizationDPI(300)
    gdpicturePDF.Print()
    gdpicturePDF.CloseDocument()
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
    gdpicturePDF.LoadFromFile("document_to_print.pdf", false);
    //Enabling the pre-rasterization option.
    gdpicturePDF.PrintSetPreRasterization(true);
    //Setting the pre-rasterization DPI.
    gdpicturePDF.PrintSetPreRasterizationDPI(300);
    gdpicturePDF.Print();
    gdpicturePDF.CloseDocument();
}
See Also