Creating PDF from Bitmap in dotNET

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Creating PDF from Bitmap in dotNET

Post by chrisM »

Hi, I'm writing an app in VB.NET which receives an image (of a document page) from a scanner. I want to save this image as a PDF file.

Can anyone tell me if it is possible to do this without first saving the image to the disk. Is is currently living inside the app as a .NET 'Bitmap' object.
If this can't be done in .NET, is is possible in regular VB6?

Thanks in advance,

Chris.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello Chris,

I didn't really understand the situation you are in. But if you are able to print the bitmap to a printer than you can convert it to pdf using the PDF Converter.

The PDF Converter is a printer driver, by printing your documents to the PDF Printer you will get pdf files. A demo version of the PDF Converter is available at www.amyuni.com . All what you have to do is to install the printer on your system and print your bitmap to it.

We have a special interface to use the printer programatically from .Net.

Hope this helps !
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Post by chrisM »

Does the PDF Convertor support PDF encryption(ie I need the PDF that I create to be encrypted?) If it does then this could be the answer!

Just to clarify my situation, consider the following VB.NET code:

dim myBitmap as Bitmap
myBitmap = GetBitmapFromScanner()

So I now have a bitmap object in memory. What I now want to be able to do is somthing like:

CreatePdfFromBitmap(myBitmap)

Which will create the PDF file. ( know that I will have to write the code for this) but the condition is that at no point do I want to have to write the bitmap to a disk file.

Regards,

Chris.
DanielBordeleau
Posts: 21
Joined: Tue Apr 29 2003
Location: Montreal, Quebec

Post by DanielBordeleau »

I think you'll have to save your Bitmap into a temporary file first (maybe using a stream datatype) and then you could add it to your PDF by creating a Picture object into the PDF.

Should work! :)
Post Reply