Problem with Out of Memory when printing images:
I have one problem.
I Get an out of memory when trying to print. If I have device set to screen
it goes ok. But if I try to print to a printer it don't work . If I set a
breakpoint at the end of this procedure and push F/ I get the error directly
whitout going into any other function/procedure. The picture is small...
(just 17k). And I have tried with different printers so It's not the
printer.
Any idea?
procedure TDllReportForm.ppGroupFooterBand8BeforePrint(Sender: TObject);
var
aNode, sign1 TTreeNode;
MemStream : TMemoryStream;
begin
try
aNode:= FindNode(LocalTreeView.Items.Item[0],'TSignature1Node');
if aNode.HasChildren then
begin
sign1:= aNode.getFirstChild;
if TEmployee(sign1.Data).Signature <> nil then
begin
ppImage4.Clear;
MemStream:= TMemoryStream.Create;
TEmployee(sign1.Data).Signature.SaveToStream(MemStream);
MemStream.Position:= 0;
ppImage4.Picture.Bitmap.LoadFromStream(MemStream);
MemStream.Free;
end;
end;
except
ShowMessage('Im4 ');
end;
end;
I Get an out of memory when trying to print. If I have device set to screen
it goes ok. But if I try to print to a printer it don't work . If I set a
breakpoint at the end of this procedure and push F/ I get the error directly
whitout going into any other function/procedure. The picture is small...
(just 17k). And I have tried with different printers so It's not the
printer.
Any idea?
procedure TDllReportForm.ppGroupFooterBand8BeforePrint(Sender: TObject);
var
aNode, sign1 TTreeNode;
MemStream : TMemoryStream;
begin
try
aNode:= FindNode(LocalTreeView.Items.Item[0],'TSignature1Node');
if aNode.HasChildren then
begin
sign1:= aNode.getFirstChild;
if TEmployee(sign1.Data).Signature <> nil then
begin
ppImage4.Clear;
MemStream:= TMemoryStream.Create;
TEmployee(sign1.Data).Signature.SaveToStream(MemStream);
MemStream.Position:= 0;
ppImage4.Picture.Bitmap.LoadFromStream(MemStream);
MemStream.Free;
end;
end;
except
ShowMessage('Im4 ');
end;
end;
This discussion has been closed.
Comments
If I compile the same report with the Old 7.02 I don't have this problem.
BR
Magnus
BR
Magnus
If possible, please send an example demonstrating this error in .zip format
to support@digital-metaphors.com and we'll take a look at it for you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
a report displaying bitmapped PDF417 barcodes.
This could possibly be the same issue, please if possible, send a small
example showing this error to support@digital-metaphors.com as well and
we'll work on a solution for you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com