|
@@ -8,7 +8,7 @@ uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, sdIDTree, sdDB, ComCtrls, ExtCtrls, VirtualTrees, PrintCom,
|
|
|
PrintComXML, MScrollBox, StdCtrls, Buttons, PNGButton, ieview,
|
|
|
- imageenview;
|
|
|
+ imageenview, jpeg;
|
|
|
|
|
|
const
|
|
|
crNext = -25;
|
|
@@ -1000,15 +1000,22 @@ procedure TSignOnlineReportsForm.ExportReports(const AFileName: string);
|
|
|
|
|
|
procedure ExportReportPage(APage: Integer; const APageFileName: string);
|
|
|
var
|
|
|
- img: TImage;
|
|
|
+ bmp: TBitmap;
|
|
|
+ img: TJPEGImage;
|
|
|
begin
|
|
|
- img := TImage.Create(nil);
|
|
|
+ bmp := TBitmap.Create;
|
|
|
+ img := TJPEGImage.Create;
|
|
|
try
|
|
|
- img.Height := PreviewComXML.ReportSize.Y;
|
|
|
- img.Width := PreviewComXML.ReportSize.X;
|
|
|
- PreviewComXML.PrintPreviewCanvas(APage, 0, img.Canvas, False);
|
|
|
- img.Picture.SaveToFile(APageFileName);
|
|
|
+ bmp.Height := PreviewComXML.ReportSize.Y;
|
|
|
+ bmp.Width := PreviewComXML.ReportSize.X;
|
|
|
+ PreviewComXML.PrintPreviewCanvas(APage, 0, bmp.Canvas, False);
|
|
|
+
|
|
|
+ img.Assign(bmp);
|
|
|
+ img.CompressionQuality := 100;
|
|
|
+ img.Compress;
|
|
|
+ img.SaveToFile(APageFileName);
|
|
|
finally
|
|
|
+ bmp.Free;
|
|
|
img.Free;
|
|
|
end;
|
|
|
end;
|