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 : 16 years ago
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 16 years ago  | Reason: Not specified

Fedor  
#2 Posted : 16 years ago
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 : 16 years ago
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 : 16 years ago
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 : 16 years ago
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 : 16 years ago
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 : 16 years ago
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 : 16 years ago
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
Similar Topics
Error when printing (Discussions – Graphics Mill)
by rullman 4 years ago
Do we still need to apply color profile when printing (Discussions – Graphics Mill)
by Todd Kneib 5 years ago
Winforms and printing samples (Discussions – Graphics Mill)
by Chris Jones 8 years ago
Image Printing in Manual Mode (Discussions – Graphics Mill)
by Chris Jones 9 years ago
Printing File Size (Discussions – Graphics Mill)
by Chris Herrington 16 years ago
Save print document as .psd or client side printing (Discussions – Graphics Mill)
by sailokesh 16 years ago
Printing Vobjects and image together (Discussions – Graphics Mill)
by cpav 17 years ago
SMPL: Printing Demo (Samples – Graphics Mill)
by Alex Kon 17 years ago
Bug printing from print preview (Discussions – Graphics Mill)
by obartelt 18 years ago
Printing an image with different aspect ratio that the paper (Discussions – Graphics Mill)
by Carlos 18 years ago
Printing without margins? (Discussions – Graphics Mill)
by Zatlite 18 years ago
Printing multipage tiffs (Discussions – Graphics Mill)
by Heffer42 18 years ago
Printing in web (Discussions – Graphics Mill)
by pxg 19 years ago
Borderless printing? (Discussions – Graphics Mill)
by morphemass 19 years ago
Printing multiple multipage tiff images (Discussions – Graphics Mill)
by Christoffer Christensen 19 years ago
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.