PDF support by Pdfium.
procedure TformMain.Button1Click(Sender: TObject);
var
i: Integer;
Bitmap: TBitmap;
begin
if OpenDialog.Execute then
begin
Pdf.FileName := OpenDialog.FileName;
Pdf.Active := True;
try
for i := 1 to Pdf.PageCount do
begin
Pdf.PageNumber := i;
Bitmap := Pdf.RenderPage(0,0,Round(Pdf.PageWidth),Round(Pdf.PageHeight));
try
Batch.AppendImage(Bitmap);
finally
FreeAndNil(Bitmap);
end;
end;
finally
Pdf.PageNumber := 1;
Pdf.Active := False;
end;
end;
end;