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
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?
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.
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
Copy link to clipboard
Copied
Hi Herm,
i am using now function:
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
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.
Copy link to clipboard
Copied
Obrigado. Não é que funciona mesmo ...
Copy link to clipboard
Copied
muchísima gracia por tu aporte me sirvió....
Copy link to clipboard
Copied
AxAcroPDF1.LoadFile("none")
Copy link to clipboard
Copied
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%