1. I now use the following code which works very well:
ThisIEBitmap := TIEBitmap.Create;
try
for i := 0 to fl.Items.Count - 1 do
begin
ThisIEBitmap.ParamsEnabled := True;
ThisIEBitmap.Params.PDF_PaperSize := iepAuto;
ThisIEBitmap.Read(fl.Items[i].Path);
ThisIEBitmap.Resample(500, 500, rfHermite, True);
ThisIEBitmap.Resize(ThisMargin, ThisMargin, ThisMargin, ThisMargin, clWhite);
ThisIEBitmap.Write('R:\test' + IntToStr(i) + '.pdf');
end;
finally
ThisIEBitmap.Free;
end;
Is there anything which must be additionally freed/released in this code to avoid memory leaks?
2. The Resample method is wonderful! Specifically, the following code with both parameter values of 500 results in a PDF with the largest dimension (width or height) to be exactly 194.0 mm:
ThisIEBitmap.Resample(500, 500, rfHermite, True);
Now, to define the values in the Resample method not in Pixel but in resulting mm in the PDF, I could write an interpolation equation. But I am sure that there is already a method to translate the Pixel values into resulting mm?