I have a requirement to create an "image only" pdf file from a source pdf file. An "image only" pdf file does not have any extractable or searchable text. The "image only" pdf file must be reduced to black and white color depth. I have code that loops over the pages of the source pdf file and gets a bitmap image of each page:
Using ms As New MemoryStream()
Dim res As New Devices.Resolution(300)
Dim bd As New Devices.BmpDevice(res)
Dim bmp As Drawing.Bitmap = New System.Drawing.Bitmap(ms, True)
I run each bitmap through a converter routine that dithers the color image of the page to black and white. The page image has any header/footer text from the original page. How do I then place the page images into a new pdf file to produce my "image" pdf file. These images are not document images but an image of the whole page.
Also, is there a way to strip out all extractable/searchable text from a pdf file? Thanks.