ThinkGeo.com    |     Documentation    |     Premium Support

Printing to PDF in good quality

Hi,

i’m trying to “export” my map to pdf. I’ve found an example using the PDFGeoCanvas, but this doesn’t work for me as i use a GeoHatchBrush, which doesn’t seem to be supported in 10.0.

My second approach was to export the map to an image-file and then include that image-file in a pdf. Thats works, but the quality of the image is quite bad. I’ve tried to increase the bitmap-size for the export, but that also increases the extend of the map shown in the image.

Can you help me on this?

Regards,
Andreas

Hi Andreas,

I did a quickly test to get bitmap like this:

private void Map_MapClick(object sender, MapClickWpfMapEventArgs e)
{
System.Drawing.Bitmap bitmap = map.GetBitmap((int)map.ActualWidth, (int)map.ActualHeight);
bitmap.Save(“screenshot.jpg”, System.Drawing.Imaging.ImageFormat.Jpeg);
}

And it looks the image keep the same quality like map shows, does you call the same API to print it?

Regards,

Ethan