Placing a PDF in a C # Application

I am creating a book for a friend. It has content in the word (docx), so I have a few questions. I created a thread earlier on how to approach this, and the best answer was to create a PDF from it. The main point of this was that we can have plug-in text fields, links and a table of contents.

Now I was wondering if I can place pdf files in my application. I want to do "Adobe Reader" basically. Is there a library that does this? Can I use the installed COM / dll for this?

The reason for this is that I had to create as a “quiz” section in my application, or a “reporting card” or even a “bookmark” function.

Thanks guys.

+5
source share
5 answers

Creating custom PDF browser controls can be extremely difficult. Instead, you could use real Adobe Reader in your application, as it is provided as a COM control that can be hosted in any Windows application. Here are the steps:

  • Launch the new WinForms application
  • Make the Acrobat control available on the toolbar (Tools → Add / Remove Toolbar Elements: Turn on “Adobe Acrobat 7.0 Browser” on the “Components COM” tab). Remember to grab a cup of coffee before clicking on the COM tab.
  • Drag the control onto the form
  • Manipulate them:

    axAcroPDF1.LoadFile("mypdf.pdf");
    axAcroPDF1.Show();
    
+6
source

, , , . :

PDF, :

  • , Adobe
  • Adobe , .
  • , ? , , , .

Acrobat, , .

. , , WebBrowser ( , WinForms) DocumentSource PDF. WebBrowser PDF-, , , Internet Explorer.

+1
+1

Adobe Reader ActiveX, . VS Toolbox COM Components. , Abobe Reader, PDF. , Adobe Reader , , - lib . -, Adobe Reader, iText #.

+1

Adobe ActiveX/com , Adobe Reader ( , / ActiveX, t Adobe Reader). Pdf, , , ( ) P/Invoke http://ccxvii.net/mupdf/, / - .

The problem with using the webbrowser control is that you have to be careful to check what happens if the target user as a PDF attachment is disabled in IE. It may happen that instead of embedding you get an external Adobe reader (or something registered as a pdf handler). Perhaps this is a workaround, but I have already been bitten by this (as a result, one of the problems "works on my machine")

0
source

All Articles