This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Chris Herrington  
#1 Posted : Friday, May 1, 2009 11:51:13 PM(UTC)
Chris Herrington

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

Fedor  
#2 Posted : Saturday, May 2, 2009 12:29:39 AM(UTC)
Fedor

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
Chris Herrington  
#3 Posted : Saturday, May 2, 2009 12:50:09 AM(UTC)
Chris Herrington

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
Fedor  
#4 Posted : Saturday, May 2, 2009 1:28:26 AM(UTC)
Fedor

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
Chris Herrington  
#5 Posted : Saturday, May 2, 2009 1:40:20 AM(UTC)
Chris Herrington

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?
Fedor  
#6 Posted : Sunday, May 3, 2009 6:28:11 PM(UTC)
Fedor

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
Chris Herrington  
#7 Posted : Monday, May 4, 2009 10:18:58 PM(UTC)
Chris Herrington

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
Dmitry  
#8 Posted : Thursday, June 18, 2009 2:35:14 PM(UTC)
Dmitry

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.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Guest (3)
Similar Topics
Error when printing (Discussions – Graphics Mill)
by rullman 3/24/2021 6:58:37 AM(UTC)
Do we still need to apply color profile when printing (Discussions – Graphics Mill)
by Todd Kneib 1/29/2020 8:34:09 AM(UTC)
Winforms and printing samples (Discussions – Graphics Mill)
by Chris Jones 4/13/2017 2:41:05 AM(UTC)
Image Printing in Manual Mode (Discussions – Graphics Mill)
by Chris Jones 6/28/2016 6:55:26 AM(UTC)
Printing File Size (Discussions – Graphics Mill)
by Chris Herrington 8/18/2009 6:03:11 AM(UTC)
Save print document as .psd or client side printing (Discussions – Graphics Mill)
by sailokesh 12/21/2008 10:19:33 PM(UTC)
Printing Vobjects and image together (Discussions – Graphics Mill)
by cpav 6/8/2008 4:47:54 PM(UTC)
SMPL: Printing Demo (Samples – Graphics Mill)
by Alex Kon 4/18/2008 12:54:36 PM(UTC)
Bug printing from print preview (Discussions – Graphics Mill)
by obartelt 12/1/2007 7:26:17 PM(UTC)
Printing an image with different aspect ratio that the paper (Discussions – Graphics Mill)
by Carlos 7/25/2007 8:00:43 PM(UTC)
Printing without margins? (Discussions – Graphics Mill)
by Zatlite 2/5/2007 6:28:06 AM(UTC)
Printing multipage tiffs (Discussions – Graphics Mill)
by Heffer42 2/4/2007 9:45:26 PM(UTC)
Printing in web (Discussions – Graphics Mill)
by pxg 10/27/2006 3:32:47 AM(UTC)
Borderless printing? (Discussions – Graphics Mill)
by morphemass 3/29/2006 5:41:48 AM(UTC)
Printing multiple multipage tiff images (Discussions – Graphics Mill)
by Christoffer Christensen 1/3/2006 12:15:42 AM(UTC)
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.