Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
Printing the content of a BitmapViewer control
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.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
In fact you can use Printer.PaintPicture. To do it, pass BitmapViewer1.Bitmap.Data.Picture into it. Hope this helps.
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Sounds strange. Try to resize the image first instead of specifying different rectangles in DrawOnHdc.
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 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...
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
By the way, try also to convert the image to 24-bit RGB pixel format (objBitmap.Data.ConvertTo24bppRgb).
|
|
|
|
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...
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 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.
|
|
|
|
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.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 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
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
Printing the content of a BitmapViewer control
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.