本文介绍了在Delphi中使用AcroPDF调整大小问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在应用程序中成功添加AcroPDF.当需要显示PDF时,我会动态创建一个AcroPDF实例,并将其插入到align设置为alClient的TPanel中.我的问题是,当调整窗体/面板的大小时,AcroPDF不会跟随.仅当加载了新文件时.我尝试了几种解决方案都无济于事.我该怎么办?

I successfully added AcroPDF in my application. When a PDF needs to be displayed I create an instance of AcroPDF dynamically and insert it into a TPanel with align set to alClient. My problem is that when the Form/Panel is resized the AcroPDF does not follow. Only if a new file is loaded. I tried several solutions to no avail. What should I do?

推荐答案

最新版本的Adobe OCX控件存在问题,您可以通过重新调整控件的位置来解决该问题.在预览对话框中(具有嵌入式的,与客户端对齐的AcroPdf控件),我在表单中使用以下 OnResize 处理程序:

It's a problem with recent versions of the Adobe OCX control, which you can work around by refocusing the control. In a preview dialog I have (which has an embedded, client-aligned AcroPdf control) I use the following OnResize handler for the form:

if Visible and (fPreviewV7 <> nil) then begin
  FocusControl(nil);
  FocusControl(fPreviewV7);
end;

这篇关于在Delphi中使用AcroPDF调整大小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 20:53