PrintSetPreRasterizationDPI Method (GdPicturePDF)
In This Topic
Specifies the rendering resolution to be used when pre-rasterization is enabled using the
GdPicturePDF.PrintSetPreRasterization method. Enabling the pre-rasterization and setting the proper DPI can dramatically improve the performance with printer drivers non-optimized for vector graphics rendering.
Syntax
Parameters
- DPI
- The rendering resolution to be used for pre-rasterization. The default value is -1, which means automatic computation based on printing quality.
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
Setting the pre-rasterization DPI 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();
}
Example
Setting the pre-rasterization DPI 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