-
March 2nd, 2010, 04:25 AM
#1
TransparentBlt return false in some printer devices.
I am using the function TransparentBlt of CImage class and in a lot of printers the bitmaps are printed in transparency correctly. But in some printer devices TransparentBlt function return false (for example Adobe PDF 6.0) and therefore the bitmaps are not printed. What can be the problem? How I can know if the printer will print correctly the bitmaps?
This is my code:
void DrawTranspBm(CDC * pDC, const CRect* pRt, COLORREF crColour, HBITMAP hBitmap)
{
CImage img;
img.Attach(hBitmap);
BOOL bRet=img.TransparentBlt(pDC->GetSafeHdc(),*pRt,crColour);
}
Can any help me please?
Thanks.
-
March 2nd, 2010, 05:36 AM
#2
Re: TransparentBlt return false in some printer devices.
Yes, some printers don't have transparent ink nor do they have other means for simulating a transparent area.
Use BitBlt() instead of TransparentBlt() although the result might be somewhat different.
-
March 17th, 2010, 05:25 AM
#3
Re: TransparentBlt return false in some printer devices.
Thanks for the reply. If I use BitBlt also fail and if I use StretchBlt I don't get the result that I need. How can I know before to print some document If the printer that I am using can use correctly TransparentBlt function or not? I am comparing two printer devices (one printer devices print transparent bitmaps correctly and the other no) using GetDeviceCaps function I only see differences in this parameters (The results of GetDeviceCaps with the others parameters are the same in the two printers):
Printer ok Printer fail
LOGPIXELSX 600 1200
LOGPIXELSY 600 1200
ASPECTX 600 1200
ASPECTY 600 1200
ASPECTXY 846 1696
HORZRES 4958 9917
VERTZRES 7016 14031
Can any help me please? Thanks.
-
March 17th, 2010, 07:34 AM
#4
Re: TransparentBlt return false in some printer devices.
Even SHADEBLENDCAPS is the same in both?
-
March 18th, 2010, 11:57 AM
#5
Re: TransparentBlt return false in some printer devices.
Thanks for the reply.
Yes, in both printers are 0.
Can any help me please?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|