Click here to Skip to main content
15,889,868 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I want to add company logo into .pdf or text file using file stream. I have added the text but I want to add company logo or any image in it. so how i add or insert it????
Please give me solution....

Thank You....
Posted

1 solution

Dear Friend,

You can try this code:-

Image image = Image.FromFile( @"c:\image.bmp" );
using(MemoryStream stream = new MemoryStream())
{
 // Save image to stream.
 image.Save( stream, ImageFormat.Bmp );
}


Hope this helps you out. From here you can output the image stream the same way you did for Text stream.

Please don't forget to mark this as your answer if it helps you out.

Any query is always welcome.

Regards

Varun Sareen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900