The rendering resolution to be used for pre-rasterization. The default value is -1, which means automatic computation based on printing quality.
Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / PrintSetPreRasterizationDPI Method

PrintSetPreRasterizationDPI Method (GdPicturePDF)

In This Topic
Specifies the rendering resolution to be used when pre-rasterization is enabled using the 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
'Declaration

 

Public Function PrintSetPreRasterizationDPI( _

   ByVal DPI As Single _

) As GdPictureStatus
public GdPictureStatus PrintSetPreRasterizationDPI( 

   float DPI

)
public function PrintSetPreRasterizationDPI( 

    DPI: Single

): GdPictureStatus; 
public function PrintSetPreRasterizationDPI( 

   DPI : float

) : GdPictureStatus;
public: GdPictureStatus PrintSetPreRasterizationDPI( 

   float DPI

) 
public:

GdPictureStatus PrintSetPreRasterizationDPI( 

   float DPI

) 

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();

}
See Also