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

How do I clear the file from AxAcroPDF object?

Community Beginner ,
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

Hi all,

I can't seem to solve this problem.
I am writing a C#  desktop app that lets a user view a PDF file and then the user will have an option to delete that file.

I first call the LoadFile("FileName") Function.
My problem occurs when the user has finished deleting the file I can't figure out a way to clear the document from the AxAcroPDF object.
It has been really bothering me.

I need to figure out how to clear the document from the AxAcroPDF object.

Could some one please help me out?


Thanks In advance.
-Adi

TOPICS
Acrobat SDK and JavaScript

Views

23.8K

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
Contributor ,
Jun 04, 2009 Jun 04, 2009

Copy link to clipboard

Copied

If you want to delete the file you have to close the pdf and after delete it. While the file is open you can't delete it.

Is it what you want?

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
New Here ,
Jul 02, 2009 Jul 02, 2009

Copy link to clipboard

Copied

Hi there,

i have the same problem as adoh41.

Dont think it what is describting joeln, its about something else.

I load file - function LoadFile(...), but cant find function for unloading it.

I can do everything with loaded file, i can delete it too and component

is still showing loaded file.

Is there any function for unloading file?

Really need it too.

Thanks.

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
New Here ,
Jul 12, 2009 Jul 12, 2009

Copy link to clipboard

Copied

Hi, I have the same problem, writing a C# application. I load the file with axacroPDF.LoadFile("File name")

but after I tried to unload the file in many kind of way but without success.

I tried also loading a null file with the command axacroPDF.LoadFile(null).

After I tried to delete the object (axacroPDF.Dispose) and to recreate it in the Form but it doesn't seem to work!!

I hope someone finds the solution,

thanks

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
New Here ,
Aug 08, 2009 Aug 08, 2009

Copy link to clipboard

Copied

Hi Herm,

i am using now function:

  • axacroPDF.Hide()
  • axacroPDF.Load()
  • axacroPDF.Show()

Dont know about any function as Unload() still , but its functional.

Fortunately it is not working with access rights of files and

i can delete, move or do anything with loading file, what i need.

Good Luck

Tri

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
New Here ,
Oct 28, 2014 Oct 28, 2014

Copy link to clipboard

Copied

All you need to do is load a pdf that does not exists. I found this out by mistake by mistyping my pdf file name.

 

AxAcroPDFobject.LoadFile("DONTEXISTS.pdf")

 

This will return the pdf viewer to blank status.

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
Community Beginner ,
Dec 16, 2015 Dec 16, 2015

Copy link to clipboard

Copied

Obrigado.  Não é que funciona mesmo ...

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
New Here ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

muchísima gracia  por tu aporte me sirvió....

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
New Here ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

AxAcroPDF1.LoadFile("none")

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
New Here ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

LATEST

Aunque ya hay varias respuestas  que funcionan...

mi solución fue enviarle un objeto vació al componente..

AxAcroPDF1.LoadFile ("nombre.pdf");

con  la extensión .pdf

y funciona 100%

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