Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
pxg  
#1 Posted : Friday, October 27, 2006 3:32:47 AM(UTC)
pxg

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 2

hello, I am trying to print a jpg from the web. i use your example from the forums
Code:
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(Server.MapPath("Images/mountain.jpg"));
try{
    bitmap.Save(Response.OutputStream, new Aurigma.GraphicsMill.Codecs.PdfEncoderOptions());
}
finally{
    bitmap.Dispose();
}
and use your sample jpg mountain.jpg but when it tries to open the stream I get an error from acrobae saying the file is corrupt and cannot be repaired. I am using reader 7.08 and i can open other pdf files.

Edited by user Tuesday, December 18, 2007 8:40:01 PM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Sunday, October 29, 2006 4:21:50 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello, Try to update your Graphics Mill for .NET to the latest version of the product from our site. I have tried the followin code:
Code:
private void Page_Load(object sender, System.EventArgs e)
{
	Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(Server.MapPath("Images/mountain.jpg"));
	try
	{ 
		Response.AppendHeader("Content-disposition", "attachment; filename=temp.pdf");
		bitmap.Save(Response.OutputStream, new Aurigma.GraphicsMill.Codecs.PdfEncoderOptions());
	}
	finally
	{ 
		bitmap.Dispose();
	}
}
It works correctly on my workstation, try it out, please.

Edited by user Tuesday, December 18, 2007 8:40:11 PM(UTC)  | Reason: Not specified

Sincerely yours, Dmitry Sevostyanov UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.