• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[Delphi Rio] How to close current pdf i show.

New Here ,
Mar 11, 2019 Mar 11, 2019

Copy link to clipboard

Copied

unit Unit1;

interface

uses

  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,

  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.OleCtrls, AcroPDFLib_TLB,

  Vcl.StdCtrls;

type

  TForm1 = class(TForm)

    acrpdf1: TAcroPDF;

    btn1: TButton;

    btn2: TButton;

    procedure btn1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btn1Click(Sender: TObject);

begin

     acrpdf1.src:=GetCurrentDir+'\assets\dokumen\welcome.pdf';

     acrpdf1.Show;

end;

end.

when I close the application I got force close. so before I close my application, I want to release the adobe reader 1st.

or any recommendation to do that?

my question is how to do that, there is no such function to do that.

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2019 Mar 15, 2019

Copy link to clipboard

Copied

LATEST

On the Form Close did you try simple nilling like acrpdf1.Src := '';  acrpdf1.Free;  acrpdf1 := Nil; ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines