Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
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();
}
This is the code I have to print an image. I need it to go to the printer this outputs it to the screen. Any ideas? Thanks in advance Chris Edited by user Saturday, May 2, 2009 12:30:04 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello Chris,
Do you mean implement preview of printing? |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
Fedor,
I would just like to pringt the image from the bitmapview straight to the printer. I do not want to have them preview it in any way. These are images they have to pay to print. I have to account for every page that is printed. If they were able to preview then they could print as many copies as possible.
So any ideas?
Thanks
Chris
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Quote:I would just like to pringt the image from the bitmapview straight to the printer. I do not want to have them preview it in any way. These are images they have to pay to print. I have to account for every page that is printed. If they were able to preview then they could print as many copies as possible. I consider two approaches to print image in Web: 1. Stream PDF file. You should just stream PDF file in a new browser window. 2. Stream HTML with embedded image. You should specially mark up page with CSS attributes intended for printing settings. You can also automatically call window.print() on page load to show print dialog. I believe PDF file is the most easiest and precision way to achieve what you need. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
Do I have to show that page or can I just send it to the printer without showing the new page?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Quote:Do I have to show that page or can I just send it to the printer without showing the new page? I believe you need to show page before sending to print. However you can show it either in hidden or very small iframe, and so printing process will be seamless for user. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
Fedor,
I have not found any clean ways of printing an image. Do you have any suggestions. I cannot be the only person that would like to print an image from codebehind rather than using the window.print(). I am just looking for a clean solution for my customer. Anyone with an ideas?
Thanks
Chris
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello Chris, We created printing sample that takes an image loaded to Bitmap Viewer and sends it to a printer using browser printing mechanism ( http://demo.aurigma.com/GraphicsMill50/PrintImage.aspx). Unfortunately we found that printed output can be slightly different if you print the same image using different browsers and there is nothing to do with it. We plan to dig into printing as it is implemented in google docs and hope will be able to provide similar solution in one of the next versions. The source code for this sample is avaialble in the Web Demos Bundle post. |
|
|
|
|
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.