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

Notification

Icon
Error

Options
Go to last post Go to first unread
senna  
#1 Posted : Wednesday, October 27, 2004 4:06:00 AM(UTC)
senna

Rank: Member

Groups: Member
Joined: 10/19/2004(UTC)
Posts: 4

Hi all, I am developing in vb6 and I'm looking a way to print "tiffs" that are located in BitmapViewer controls. I've tried with the printer.paintpicture method but it doesn't accept tiffs... :'( Anyone knowing a solution? Thanks a lot Davy.
Andrew  
#2 Posted : Wednesday, October 27, 2004 2:01:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
In fact you can use Printer.PaintPicture. To do it, pass BitmapViewer1.Bitmap.Data.Picture into it. Hope this helps.
senna  
#3 Posted : Thursday, October 28, 2004 4:24:00 AM(UTC)
senna

Rank: Member

Groups: Member
Joined: 10/19/2004(UTC)
Posts: 4

Andrew, it works!!! :D Thank you very much for your fast reply! ;) Kind Regards Davy.
jvv  
#4 Posted : Thursday, November 25, 2004 3:48:00 PM(UTC)
jvv

Rank: Member

Groups: Member
Joined: 10/14/2004(UTC)
Posts: 37

Is there any possibility to print the content of the BitmapViewer control in a delphi application? I tried the DrawOnHDC method, but I get errors when I'm trying to print graphics greater than 400x400 pixels
Code:
procedure TMainForm.Print;
 var APrinter: TPrinter;
   SrcX, SrcY, DstX, DstY: Double;
begin
//  MessageDlg('Printfunctie is nog niet beschikbaar', mtInformation, [mbOK], 0);
  APrinter := TPrinter.Create;
  APrinter.BeginDoc;
  DstX := 800;
  DstY := 800;
  TiffViewer.Bitmap.DrawOnHdc(APrinter.Handle, 0, 0, DstX, DstY, 0, 0, 400, 400,
    CombineModeCopy, InterpolationModeMediumQuality);
  APrinter.EndDoc;
  APrinter.Free; 
end;

Edited by user Monday, December 24, 2007 4:25:59 PM(UTC)  | Reason: Not specified

Andrew  
#5 Posted : Sunday, November 28, 2004 1:24:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
What errors you get?
jvv  
#6 Posted : Tuesday, November 30, 2004 2:57:00 PM(UTC)
jvv

Rank: Member

Groups: Member
Joined: 10/14/2004(UTC)
Posts: 37

I get the following error: 'Method DrawOnHdc failed. Some unexpected error occured. If you see this message, please contact [email removed]'

Edited by user Friday, May 23, 2008 3:44:49 PM(UTC)  | Reason: Not specified

Andrew  
#7 Posted : Friday, December 03, 2004 3:30:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Sounds strange. Try to resize the image first instead of specifying different rectangles in DrawOnHdc.
jvv  
#8 Posted : Tuesday, December 07, 2004 8:46:00 PM(UTC)
jvv

Rank: Member

Groups: Member
Joined: 10/14/2004(UTC)
Posts: 37

When I resize, or when I try to copy exactly from the BitmapViewer to the printer, I still get the same errors
Andrew  
#9 Posted : Monday, January 03, 2005 4:24:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Please excuse me for a delay with an answer. I still cannot reproduce the problem. A simple delphi project where this problem reoccurs would be helpful...
Andrew  
#10 Posted : Monday, January 03, 2005 4:27:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
By the way, try also to convert the image to 24-bit RGB pixel format (objBitmap.Data.ConvertTo24bppRgb).
jvv  
#11 Posted : Monday, January 03, 2005 8:30:00 PM(UTC)
jvv

Rank: Member

Groups: Member
Joined: 10/14/2004(UTC)
Posts: 37

I now downloaded the GraphicsMill for .NET. I assume that I can use my Graphics Mill 2 license key... I have seen that version 3 does support printing...
Andrew  
#12 Posted : Monday, January 03, 2005 11:17:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
The license key will not work, but everyone who purchase Graphics Mill after 15th of July, 2004 will get free upgrade. The printing control is not included into this pre-release version, but it will be available in the final version. P.S. If you have any feedback for the Graphics Mill for .NET, please post it in the Graphics Mill for.NET forum.
jvv  
#13 Posted : Tuesday, January 04, 2005 8:38:00 PM(UTC)
jvv

Rank: Member

Groups: Member
Joined: 10/14/2004(UTC)
Posts: 37

Do you send the license key by email? When do we get it? We want to use the new bitmapviewer as soon as possible. Thanks in advance.
Andrew  
#14 Posted : Wednesday, January 05, 2005 11:35:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Please submit case. Note, this is just a pre-release version. So it still may contain some bugs. You can start writing the code though (since the API will not be changed).

Edited by user Friday, May 23, 2008 3:45:47 PM(UTC)  | Reason: Not specified

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.