Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Bitmap Transparency and Adobe's Printer Driver
Conf: (P-PDF) Developers, Msg: 117748
From: DrDevious
Date: 8/24/2004 04:14 AM

Have any of you successfully used Adobe's PDF Windows printer driver to create PDF documents containing transparent bitmaps (such that only the foreground pixels of a photo are displayed/printed)? The following technique described below has worked for me for years when printing to a real printer using the Win32 GDI API but results in black background pixels when printing to a PDF file via Adobe's PDF Windows printer driver:

1. Create a DIB version of a photo (bitmapped) image.

2. Create a monochrome mask DIB of the same width and height such that the black pixels in the mask define which pixels in the photo are foreground pixels and the white pixels in the mask define which pixels in the photo are background pixels.

3. Clear the photo DIB's background pixels to black by bitwise AND'ing the photo DIB with the inverse of the mask DIB.

4. Clear the pixels in the printer DC that are to be replaced by the photo's foreground pixels by printing the monochrome mask DIB to the printer DC via StretchDIBits with a raster operation of SRCAND.

5. Finally, print just the photo's foreground pixels by sending the photo DIB to the printer DC via StretchDIBits with a raster operation of SRCOR.


(This is being done under Windows 2000 and Windows XP.)

Any help with this would be greatly appreciated.

Thanks,
DrDevious


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.