Rank: Advanced Member
Groups: Member
Joined: 9/6/2005(UTC) Posts: 106
|
Dmitry,
What is the best way to output an image to a printer from the viewer?
Thanks in advance
Chris
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello Chris, Quote:Chris Herrington (9/14/2005)
What is the best way to output an image to a printer from the viewer? Let's me answer instead of Dmitry :) The best way of printing images is to save them in PDF file and then stream it to browser. On other side you can stream JPEG or PNG image to browser and then call window.print() method from JavaScript, however in this case you have almost no way to control settings. Edited by user Wednesday, October 29, 2008 2:24:27 AM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 9/6/2005(UTC) Posts: 106
|
Have any samples of how to do that?
Thanks
Chris
|
|
|
|
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 Chris, Here is a small code sample how to print image in the web application via PDF format: Code:Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(Server.MapPath("Images/1.jpg"));
try
{
bitmap.Save(Response.OutputStream, new Aurigma.GraphicsMill.Codecs.PdfEncoderOptions());
}
finally
{
bitmap.Dispose();
}
If you have some questions, please, feel free to contact us. Edited by user Sunday, December 23, 2007 5:38:01 PM(UTC)
| Reason: Not specified |
|
|
|
|
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.