How to use the Adobe ActiveX in InTouch to display documents. Scroll down to Adobe PDF Reader in the Available Active X Controls then highlight this and click the Install button. 3 When you click on the Active Control Installation the Adobe PDF Reader should now be available as seen below. 4 Create a new InTouch window and the click on the Wizard hat as seen below. Dec 03, 2015 Pat, Thanks for the response. As noted, I had already tried changing that registry value. In any case other ActiveX controls that are only 32-bit do work fine. Pat, Thanks for the response. As noted, I had already tried changing that registry value. In any case other ActiveX controls that are only 32-bit do work fine. Adobe PDF Active X in MFC Application. In its OnInitDialog, I try to create an object out of Adobe Reader ActiveX (an object out of the autogenerated class CAcroAXDocShim). Then I load a PDF file in the control. The problem is that sometimes it works and sometimes it opens without showing anything untill I click once inside the PDF control so the file appears. This is really strange.
Active4 years, 2 months ago
We have a .NET C# application that makes use of the Adobe ActiveX Controls. For versions 7-10 of both Adobe Acrobat and Adobe Reader, to use this control you were required to turn on the 'Display PDF In Browser' setting. You could do this manually from the GUI using
or programmatically by setting the registry settings directly
Which follows the SDK reference http://www.adobe.com/devnet-docs/acrobatetk/tools/PrefRef/Windows/Originals.html#BrowserIntegration. Our application has been using the programmatically setting of this registry value when our customers have versions 7-10 of Adobe Reader or Adobe Acrobat. The link above also indicates that this
bBrowserIntegration
registry key is deprecated in XI (11). The old registry path still exists in the new versions, i.e.:however there is no longer a
bBrowserIntegration
key just as the documentation indicates, it is deprecated.It does appear that the Adobe ActiveX Control still works just fine with XI and DC as long as Display PDF in Browser is enabled, as it always has.
For versions XI (11) and DC, there are two published links that clearly show how to achieve this manually:
When testing Adobe Reader DC, if we don't complete the steps to enable the Display PDF in Browser for a new customer installation, then our application will throw a
COM error
and then if we enable the setting following the instructions in the link above, everything works as expected with our application, it renders PDFs using the Adobe ActiveX Control, which is similar to what we expect to see in older versions (7-10) when the registry setting was not set (see my old post and my own solution back then How to diagnose cause, fix, or work around Adobe ActiveX / COM related error 0x80004005 progmatically?).So, the question remains, what is the expected programmatic equivalent either for the manual process in XI or DC today or the equivalent to what worked in 7-10 by setting the registry setting
bBrowserIntegration
accordingly. We want to be able to turn it on and then reset it to the previous setting when our application ends (so our application doesn't force the user to keep the setting just because our application needs it) which is what we do today for 7-10.I can't seem to find any references online for how to enable/disable browser integration from a developer standpoint so our application can continue to the use the ActiveX Control and not have the COM errors show up, forcing the user to change this manually.
The primary priority is to understand the solution for DC as this represents the new paradigm for Adobe Acrobat/Reader.
Community♦
StreamlineStreamline
73133 gold badges1919 silver badges4444 bronze badges
1 Answer
Have you considered the use of 'Registration free' scenario? It allows to use COM/ActiveX components in your application without registering the ActiveX globally and allows to load the isolated COM/ActiveX control for your application only based on the interfaces defined in the XML manifest included along with your application.
See this post for the list of tools and this post for sample XML manifest to use Flash plugin and this step by step guide. I assume that for Adobe Reader control you should use PDF.ocx from C:Program FilesAdobeAcrobat ReaderActiveX folder.
UPDATE (July 27 2015): In the latest versions of Adobe Reader they use AcroPDF.dll and moved it into Program FilesCommon FilesAdobeAcrobatActiveX as I've checked with Adobe Reader 11. Unfortunately AcroPDF.dll throws error when trying to install it using regsvr32.exe. I suppose it checks some additional keys before initializing to protect from non permitted use (until user unblocks the control in IE). Seems like there is not way officially and programmatically walk around the requirement for user to explicitly permit PDF control for use by non-Adobe apps.
Also see the discussion regarding possible issues on x64 platform: the better and more reliable way is to use Adobe Reader control indirectly by hosting IE’s WebBrowser control that will invoke the embedded PDF viewer control accordingly.
Community♦
EugeneEugene
Not the answer you're looking for? Browse other questions tagged .netpdfcomadobeactivex or ask your own question.
PDF files have an internal document format that requires a software object that 'understands' the format. Since many of you might have used the functions of Office in your VB code, let's look briefly at Microsoft Word as an example of processing a formatted document to make sure we understand the concept. If you want to work with a Word document, you have to add a Reference to the Microsoft Word 12.0 Object Library (for Word 2007) and then instantiate the Word Application object in your code.
(' must be replaced with the actual path to the document to make this code work on your PC.)
Microsoft uses the Word Object Library to provide other methods and properties for your use. Read the article COM -.NET Interoperability in Visual Basic to understand more about Office COM interop.
But PDF files aren't a Microsoft technology. PDF - Portable Document Format - is a file format created by Adobe Systems for document exchange. For years, it was totally proprietary and you had to get software that could process a PDF file from Adobe. On July 1, 2008, PDF was finalized as a published international standard. Now, anyone is permitted to create applications that can read and write PDF files without having to pay royalties to Adobe Systems. If you plan on selling your software, you still may be required to get a license, but Adobe provides them royalty-free. (Microsoft created a different format called XPS that is based on XML. Adobe's PDF format is based on Postscript. XPS became a published international standard on June 16, 2009.)
The Uses of PDF
Since the PDF format is a competitor to Microsoft's technology, they don't provide a lot of support and you have to get a software object that 'understands' the PDF format from someone other than Microsoft right now. Adobe returns the favor. They don't support Microsoft technology all that well either. Quoting from the latest (October 2009) Adobe Acrobat 9.1 documentation, 'There is currently no support for the development of plug-ins using managed languages such as C# or VB.NET.' (A 'plug-in' is an on-demand software component. Adobe's plug-in is used to display PDF's in a browser.')
Since PDF is a standard, several companies have developed software for sale that you can add to your project that will do the job, including Adobe. There are also a number of open-source systems available. You could also use the Word (or Visio) object libraries to read and write PDF files but using these large systems for just this one thing will require extra programming, also has license issues, and will make your program bigger than it has to be.
Just as you need to buy Office before you can take advantage of Word, you also have to buy the full version of Acrobat before you can take advantage of more than just the Reader. You would use the full Acrobat product in about the same way that other object libraries, like Word 2007 above, are used. I don't happen to have the full Acrobat product installed so I couldn't provide any tested examples here.
How To
But if you only need to display PDF files in your program, Adobe provides an ActiveX COM control that you can add to the VB.NET Toolbox. It will do the job for free. It's the same one you probably use to display PDF files anyway: the free Adobe Acrobat PDF Reader.
To use the Reader control, first make sure that you have downloaded and installed the free Acrobat Reader from Adobe.
Step 2 is to add the control to the VB.NET Toolbox. Open VB.NET and start a standard Windows application. (Microsoft's 'next generation' of presentation, WPF, doesn't work with this control yet. Sorry!) To do that, right-click on any tab (such as 'Common Controls') and select 'Choose Items ...' from the context menu that pops up. Select the 'COM Components' tab and click the checkbox beside 'Adobe PDF Reader' and click OK. You should be able to scroll down to the 'Controls' tab in the Toolbox and see the 'Adobe PDF Reader' there.
Now just drag the control to your Windows Form in the design window and size it appropriately. For this quick example, I'm not going to add any other logic, but the control has lots of flexibility that I'll tell you how to find out about later. For this example, I'm just going to load a simple PDF that I created in Word 2007. To do that, add this code to the form Load event procedure:
Pdf Activex Control
Substitute the path and file name of a PDF file on your own computer to run this code. I displayed the result of the call in the Output windows only to show how that works. Here's the result:
Adobe Pdf Activex Control Mac
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
If you want to control the Reader, there are methods and properties for that in the control too. But the good folks at Adobe have done a better job than I could. Download the Adobe Acrobat SDK from their developer center (http://www.adobe.com/devnet/acrobat/). The AcrobatActiveXVB program in the VBSamples directory of the SDK shows you how to navigate in a document, get the version numbers of the Adobe software you are using, and much more. If you don't have the full Acrobat system installed - which must be purchased from Adobe - you won't be able to run other examples.