6 Replies Latest reply on Feb 23, 2017 6:31 AM by Karl Heinz Kremer

    Bates Numbering

    satyenk75163452

      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

        • 1. Re: Bates Numbering
          gkaiseril MVP & Adobe Community Professional

          I would start by downloading the Acrobat SDK documentation

          • 2. Re: Bates Numbering
            satyenk75163452 Level 1

            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

            • 3. Re: Bates Numbering
              Karl Heinz Kremer Adobe Community Professional

              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()

              • 4. Re: Bates Numbering
                satyenk75163452 Level 1

                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

                • 5. Re: Bates Numbering
                  Test Screen Name Most Valuable Participant

                  No you did not understand correctly. Thise methods can only be used in a plugin, not in any external EXE or DLL.

                  • 6. Re: Bates Numbering
                    Karl Heinz Kremer Adobe Community Professional

                    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.