From: phil oakleaf on 22 Feb 2010 07:46 I am using BitBlt with SRCAND and everything works perfectly on screen and the normal printers. But, when I print to a PDF driver the SRCAND flag seems to be ignored so the result is wrong. (I have read elsewhere that PDF does not handle SRCAND) Does anyone have any ideas how to handle this? Many thanks Phil
From: Joseph M. Newcomer on 22 Feb 2010 08:25 I suspect that the PDF not handling SRCAND is correct. You would have to say more about what you are trying to accomplish, but the most likely thing you need to do is to create your bitmap using whatever combination of BitBlt operations you want, then use that final, resulting BitBlt as the output to the PDF file. Similar problems arise when using alpha blending with most printer drivers. joe On Mon, 22 Feb 2010 12:46:20 +0000, phil oakleaf <news(a)oakleafsoftware.co.uk> wrote: >I am using BitBlt with SRCAND and everything works perfectly on screen >and the normal printers. > >But, when I print to a PDF driver the SRCAND flag seems to be ignored so >the result is wrong. > >(I have read elsewhere that PDF does not handle SRCAND) > >Does anyone have any ideas how to handle this? > >Many thanks >Phil Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: phil oakleaf on 22 Feb 2010 09:14 I have an HBITMAP created from a B/W Tiff (up to 12000x9000 pixels) and over this we display a set of solid filled shapes. On screen I first draw the shapes in solid colour then bitBlt the HBITMAP over using the following int mode=cdc->SetStretchBltMode( HALFTONE ); cdc->StretchBlt(X1,Y1,X2-X1,Y2-Y1,&tDc,sx1,sy1,(sx2-sx1),(sy2-sy1),SRCAND); cdc->SetStretchBltMode( mode); works great on screen and my OfficeJet printer On PDF the HBITMAP blocks out the coloured shapes Hope this helps Phil
From: Joseph M. Newcomer on 22 Feb 2010 11:07 Sadly, far too many printer drivers fail to handle a lot of interesting cases. Adobe has not been among the best-and-brightest in the world, either. I had a problem like this some years ago, where I had a PowerPoint slide with a bitmap background, on which I was putting text. None of the text printed. When I called to report the problem, I was referred to Adobe, who confirmed that they stupidly "sorted" the output so that bitmaps were sent down *after* text (thus ignoring ALL Z-order requirements). I was under the impression they had fixed this defect more than ten years ago, but sometimes stupidity knows no time limits. And worse still, sometimes comes back, particularly if you are not using an Adobe driver (Adobe should know better by now, but I've found, in some cases, independent vendors re-invent the same mistakes). Since the problem occurred, I do not recall trying to print text on bitmaps, but I'm sure I have. If so, it has certainly worked. I have not tried anything complex with my third-party PDF printer driver. What you want to do *should* work, and if it doesn't, you should feel justified in reporting it as a serious bug to whomever created the PDF driver. joe On Mon, 22 Feb 2010 14:14:27 +0000, phil oakleaf <news(a)oakleafsoftware.co.uk> wrote: >I have an HBITMAP created from a B/W Tiff (up to 12000x9000 pixels) and >over this we display a set of solid filled shapes. > >On screen I first draw the shapes in solid colour >then bitBlt the HBITMAP over using the following > >int mode=cdc->SetStretchBltMode( HALFTONE ); >cdc->StretchBlt(X1,Y1,X2-X1,Y2-Y1,&tDc,sx1,sy1,(sx2-sx1),(sy2-sy1),SRCAND); >cdc->SetStretchBltMode( mode); > >works great on screen and my OfficeJet printer > >On PDF the HBITMAP blocks out the coloured shapes > >Hope this helps >Phil Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: phil oakleaf on 22 Feb 2010 12:09 Thanks for all the info What I'm doing now is to create a Bitmap and combine the Solid Shapes and HBITMAP in memory - then BitBlt that image back to the printer. So I output the solid colours on to the CDC The instead of just BitBlting the HBITMAP, I first BitBlt the area on the CDC where the Tif will go into a CBitmap - this should now contain the solid colours that will be under the TIF. Then I BitBlt the Tif image over that using SRCAND - this should create the correct image. Finally Bitblt the HBITMAP back into the CDC This works beautifully on screen but on printers and print preview I either get no colours or a big solid black block It seems as though the printer CDC does not have my coloured shapes Is this becuase the Printer CDC works differently to the screen? Hope this is clear enough Phil
|
Next
|
Last
Pages: 1 2 Prev: How To maintain ListControl Values Next: Cannot execute C preprocessor cl.exe |