Copy link to clipboard
Copied
Hi, I wanted to create a UI panel in acrobat Pro.
I want it to appear when my plugin is loaded and I want to host a react app within the panel. User should be able to select contents within the panel and the panel should be able to interact with the pdf document. How can I go about creating such a thing using acrobat SDK and are there any samples avaialable which I can refer?
Copy link to clipboard
Copied
Yes, this is possible. Plug-ins are written in C++, but are restricted by the Acrobat environment. However, there is no reason a web brower with sufficient JavaScript support couldn't be displayed by the plug-in. Plug-ins in Windows can also use ActiveX, which could be used for this purpose.
There are no samples of this type of plug-in, so you need to know what you are doing.
Copy link to clipboard
Copied
How should I go about it then, any suggestion where I could start?
Copy link to clipboard
Copied
Well, say that you wanted to create a stand alone application that displayed a React application in a browser, do you have an idea of how you'd do it? I'd start there.
Copy link to clipboard
Copied
I have the react app, I want to understand how to embed it.
Copy link to clipboard
Copied
So my current understanding is that I have to use CEF to act as a web browser for my react app, and I will embed CEF into my plugin. My issue now is to get started with creating this. I am able to create a plugin, now I want to be able to create this interaction between CEF and my react app and then finally integrate it all. How should I go about it?
Copy link to clipboard
Copied
The questions isn't how to embed the "Chromium Embedded Framework" into a plug-in, but how is CEF embedded into any application? Given the name, I suspect it was specifically designed for his purpose. So, you should be asking, how is it used in a C++ application. Figure that out and you have solved the plug-in issue.
This question is outside the scope of this forum, which is about Acrobat issues, and at this point, CEF embedding is a programming issue about a completely different application.
But Here's a video on using CEF in a windows application. I found it, and a lot of other info, by doing a google search on "Chromium Embedded Framework".
https://www.youtube.com/watch?v=goAkhSHarWE
Copy link to clipboard
Copied
This helped break the process down for me thanks a ton! With that said I would still like to understand how to inject CEF in Acrobat. Like what method//object should I use to actually display the panel. Should it be an AVWindow object? basically I want a similar look to what addins in Word/Excel have and it would be great if I can undock the panel later to resize it. Thanks in advance!
Copy link to clipboard
Copied
An Acrobat plug-in on windows can access an ActiveX interface. This can be used to display a UI that is outside of Acrobat. so thats one method. However, there is also no reason that the plug-in itself can't display it's own windows. There isn't any need to use the Acrobat SDK services.
I think your best approach is to build a stand alone app with C++, that dispalys the CEF. Once you have this working, you should be able to use the same code in a plug-in.
Copy link to clipboard
Copied
Sure thanks, my question was more concerned with once I have CEF embeded in a plugin how do I display it in acrobat? Does that make sense?
Copy link to clipboard
Copied
The plug-in environment is not well explained, but it's not really that much different from any C++ DLL in Windows. So, I would think the CEF is displayed in exactly the same way it is in a stand alone application. The only restrictions preventing the CEF display might be when Acrobat is in Protected mode.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now