PrintSetPreRasterization Method (GdPicturePDF)
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 GdPicturePDF.PrintSetPreRasterizationDPI method when pre-rasterization is enabled.
'Declaration
Public Function PrintSetPreRasterization( _
ByVal As Boolean _
) As GdPictureStatus
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.
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();
}