Copy link to clipboard
Copied
I would like to automate the bates numbering from my C# / JavaScript code on the existing pdf documents. Can someone help me how do I approch this. Is there a dll that I can call inside my code to achieve this?
Thanks in advance.
Satyen
Copy link to clipboard
Copied
I would start by downloading the Acrobat SDK documentation
Copy link to clipboard
Copied
Thanks.... gkaiseril. for your response.
I have been all over (Acrobar SDK documentation) it to find the solution. I found the folder with few VC++ files with project as follows...
sdkDC_v1_win\Adobe\Acrobat DC SDK\Version 1\PluginSupport\Samples\BatesNumbering
There is no explanation what so ever and I think it is missing few files. I loaded the project and it fails to compile. I checked for everything and I am not sure how to move forward. This is where I need some help to cross the brick wall I hit.
Can you help me on this please?
-Satyen
Copy link to clipboard
Copied
This is a sample Acrobat plug-in and not something you can use in C# or JavaScript. There is nothing missing from this project, it works, but you need to know how to compile and install a plug-in. This information is in the SDK.
If you want to create Bates numbers in JavaScript or C#, you are unfortunately out of luck: The Bates function is not accessible via these APIs. You can however create your own Bates like functionality by using the Doc.addWatermarkFromText() method: Acrobat DC SDK Documentation - Doc.addWatermarkFromText()
Copy link to clipboard
Copied
Thanks for the response Karl.
So..let me make sure I understood this ....
The code is for the Plug In. So I am creating a plug In for Bates Numbering where I add this code. Once the Plug In is created it will be functional inside the Acrobat to go through the interface and create the Bates. Manual approach.
If I understood it correctly, then can I use this (VC++) code to create a DLL and use it in my project where I could use these methods to construct the Bates and add it to the Doc. If so which References should I use to get the functionality.
I will look into Watermark approach as you have suggested, but if this is possible the way I think I want to do then that would be much better.
Once again thanks for your response....much appreciated.
-Satyen
Copy link to clipboard
Copied
No you did not understand correctly. Thise methods can only be used in a plugin, not in any external EXE or DLL.
Copy link to clipboard
Copied
Let me add a bit more information to what TSN said.
Even though you are technically generating a DLL when you create an Acrobat plug-in, that DLL is only useful when loaded into Acrobat as a plug-in. You will only find the code that you wrote yourself in that plug-in DLL, and therefore the DLL depends on Acrobat to provide all the functionality your code is interfacing with.
You could implement some sort of server in your plug-in so that you can use it's functionality from outside of Acrobat, but before you do that, you need to review the EULA you agreed to when you installed Acrobat: You cannot use Acrobat in a server environment, or in a server-like environment where you are technically not running on a server, but providing a service to users who do not have their own Acrobat license.
Your best bet is to use the JavaScript addWatermarkFromText() method - it's the one you can implement without having to climb the learning curve of creating Acrobat plug-ins, and, using the JSObject interface, you can even use it from your C# application. This does of course require that Acrobat (and not just the free Reader) is installed on every system you want to use this functionality on.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now