If you are seeing larger PDF files created in v8 than your v7 code, then ensure that your source images do not contain an alpha channel.
Support for Alpha channels in PDF was added in v8 and this will enlarge PDF documents.
Example code from user:
procedure TForm1.Button1Click(Sender: TObject);
var
MyImage : TImageEnView;
FileName : string;
Is24RGB : boolean;
I: Integer;
begin
FileName := 'D:\Save.PDF';
if FileExists(FileName) then
DeleteFile(PChar(FileName));
MyImage := TImageEnView.Create(nil);
MyImage.LegacyBitmap := False;
try
MyImage.IO.CreatePDFFile(FileName);
try
for I := 0 to Listbox1.Items.Count - 1 do
begin
MyImage.IO.LoadFromFileTIFF(Listbox1.Items[i]);
MyImage.IO.Params.PDF_PaperWidth := MyImage.IEBitmap.Width;
MyImage.IO.Params.PDF_PaperHeight := MyImage.IEBitmap.Height;
if chkForceMono.checked then
begin
MyImage.Proc.ConvertToBWThreshold(-1);
MyImage.RemoveAlphaChannel();
end;
Is24RGB := MyImage.IEBitmap.PixelFormat = ie24RGB;
if Is24RGB then
MyImage.IO.Params.PDF_Compression := ioPDF_JPEG
else
MyImage.IO.Params.PDF_Compression := ioPDF_G4FAX;
MyImage.IO.SaveToPDF;
end;
finally
MyImage.IO.ClosePDFFile;
end;
finally
MyImage.Free;
end;
end;
Nigel
Xequte Software
www.imageen.com