Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to open a PDF inside a c# application with Acrobat.dll?
    text
    copied!<p>I know that I can display a PDF file in my c# executable (not web app) with:</p> <pre><code>private AxAcroPDFLib.AxAcroPDF axAcroPDF1; axAcroPDF1.LoadFile(@"somefile.pdf"); axAcroPDF1.Show(); </code></pre> <p>But that is the regular pdf viewer like in the browser. I don't want that. I want full Adobe Standard or Professional functionality in my C# application using the Adobe controls. For example, if I use the code above, it loads in the C# app and I can see the adobe toolbar (print, save, etc.) But it is useless to me because I need things like save which cannot be done with the activex viewer above. Specifically, you cannot save, just as you cannot within the broswer.</p> <p>So, I referenced the acrobat.dll and am trying to use:</p> <pre><code>Acrobat.AcroAVDocClass _acroDoc = new Acrobat.AcroAVDocClass(); Acrobat.AcroApp _myAdobe = new Acrobat.AcroApp(); Acrobat.AcroPDDoc _pdDoc = null; _acroDoc.Open(myPath, "test"); pdDoc = (Acrobat.AcroPDDoc)(_acroDoc.GetPDDoc()); _acroDoc.SetViewMode(2); _myAdobe.Show(); </code></pre> <p>It opens adobe acrobat but it opens it outside of my c# application. I need it to open in my c# application like the activex library does. Can it be done with these libraries?</p> <p>If I cannot open it in my c# application I would like to be able to "hold" my c# app tied to it so the c# app knows when I close the adobe app. At least that way I'd have some measure of control. This means I would hit open, the adobe app opens. I close the adobe app, my C# app is aware of this and loads the newly changed doc with the activex library (because I don't need change ability anymore, just displaying.)</p> <p>I have the full versions of adobe acrobat installed on my computer. It is not the reader.</p> <p>Thank you for any help.</p> <p>edit: There is an example in vb in the adobe acrobat sdk. I believe it is called activeview.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload