Usbprint bad quality using VF61 and WinCe7

Dear guys,
I want to print a screenshot using external printer.
I connected the printer by USB port. I try to print but the print quality is bad.

In the code I use the generic “PCL Laser” .
I tried with the right printer name but the quality is not better.

Could you tell me if this is normal or I 'm wrong anything?
I use the following code lines:

    DEVMODE dm;
	pBGR	bufImage;
	memset(&dm, 0, sizeof(DEVMODE));
	wcscpy(dm.dmDeviceName,L"PCL Laser");
    dm.dmSize = sizeof(DEVMODE);
	dm.dmColor = DMCOLOR_MONOCHROME;
    dm.dmPaperSize = DMPAPER_A4;
    dm.dmPrintQuality = DMRES_DRAFT;
    dm.dmFields = DM_PAPERSIZE | DM_PRINTQUALITY | DM_COLOR;

	DEVMODE  *lpc = &dm; 
	HDC hdcPrinter = NULL;
    hdcPrinter = CreateDC(L"pcl.dll",L"PCL Laser", L"LPT1:", lpc);

	 
	// This sets up information for the spooler on document information
	DOCINFO lDocInfo	=	{0};
	lDocInfo.cbSize	=	sizeof(DOCINFO);
	lDocInfo.fwType	=	0;
	lDocInfo.lpszDatatype =0;
	lDocInfo.lpszOutput = NULL;

	// Start the document - tells windows there is a document coming
	StartDoc(hdcPrinter, &lDocInfo);

	// Indicates you are starting a new page
	StartPage(hdcPrinter);
	HBITMAP hbitmapAT;
	BITMAPINFO bi;
	
	
	int nx = 800;
	int ny = 400;

	bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
	bi.bmiHeader.biWidth = nx;
	bi.bmiHeader.biHeight = - ny;	 
	bi.bmiHeader.biPlanes = 1;
    bi.bmiHeader.biBitCount = 1;	//32
    bi.bmiHeader.biCompression = BI_RGB;
    bi.bmiHeader.biSizeImage = nx * 3 * ny;	//4	
    bi.bmiHeader.biClrUsed = 0;
    bi.bmiHeader.biClrImportant = 0;
	
	hwndAudiometriaTonale = FinestraTonale.WinHandle;
	hdcAudiometriaTonale = GetDC(hwndAudiometriaTonale);
	hbitmapAT = CreateDIBSection(NULL,&bi,DIB_RGB_COLORS,(VOID **) &bufImage,NULL,NULL);
	SelectObject(hdcPrinter,hbitmapAT);
	BitBlt(hdcPrinter,0,0,800,ny,hdcAudiometriaTonale ,0,0,SRCCOPY);
    ReleaseDC(hwndAudiometriaTonale, hdcAudiometriaTonale);
	EndPage(hdcPrinter);
	EndDoc(hdcPrinter);

Best regards
Matteo

I attach the screenhot and a print.
Best regards
Matteo

I attach the screenshot and a print.

Best regards
Matteo

link text

Dear @Matte,

Thank you for contacting Toradex Community!

Maybe color conversion was not proper. Maybe there is a printer setting in the PCL driver that can be changed for the Color conversion method, I am looking at the details before that could you try the below suggestion.

Could you try to create a B/W DIB and blits to the printer? Let us verify the quality.

Dear @Matte,

Could you dump the [HKEY_LOCAL_MACHINE\Printers\PCL Laser] registry and share it with us?

If you want reference code from WinCE source, please refer this test code after installing WinCE

 C:\WINCE600\PRIVATE\TEST\GWES\GDI\GDIPRINT\gdiprint.cpp

Following options are available, could you try relevant to your printer settings and let us know the result.

/* print qualities */  
#define DMRES_DRAFT         (-1)  
#define DMRES_HIGH          (-4)  

/* color enable/disable for color printers */  
#define DMCOLOR_MONOCHROME  1  
#define DMCOLOR_COLOR       2