delphi - 在 Delphi 2009 中显示 PDF 文件的最佳方式是什么

标签 delphi pdf delphi-2009 components

我应该使用什么组件在 Delphi 2009 应用程序中显示 PDF 文件?

编辑:

我一直在使用PDF Viewer by Synactis - 一个非常好的免费 PDF 查看器 但它没有 Delphi 2009 支持。

所以我需要从产品中设计它

最佳答案

我们在 Delphi 应用程序中嵌入了 Acrobat Reader。 看看这篇文章“How to embed Adobe Acrobat into your application”。 将 Acrobat Reader ActiveX 组件添加到表单后,您可以使用以下代码:

procedure TForm1.Button1Click(Sender: TObject); 
begin
  // This example assumes that you have a TOpenDialog
  // and TPdf dropped onto your form
  OpenDialog1.Filter := 'PDF Files (*.pdf)|*.pdf';
  if OpenDialog1.Execute then
    Pdf1.src := OpenDialog1.FileName;
end;

有原生的 Delphi 组件,但嵌入 Acrobat Reader 组件满足了我们的需求。

关于delphi - 在 Delphi 2009 中显示 PDF 文件的最佳方式是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/624246/

相关文章:

delphi - Delphi 2009下将字符串保存到磁盘

Delphi - 为什么在Assign()过程中不复制事件?

Delphi Intraweb 捆绑 SSL

delphi - 如何更改 TCheckBox、TRadioButton、TGroupBox 上的标题字体颜色?

c# - 使用密码 C# 保护 pdf 文件

linux - 使用 Linux 进行 pdf 嵌入的高效图像压缩

mysql - Delphi 2010 和 Dbexpress 部署

windows - delphi windows服务无法从互联网下载文件

Android - 在外部应用程序中打开 pdf

delphi - Delphi 2009-错误?将所谓的无效值添加到集合中