1 2 Previous Next 46 Replies Latest reply on Jan 2, 2018 2:02 PM by cschmelter

    Creating add-ons toolbar button with custom icon

    cschmelter Level 1

      I have a folder level JavaScript that is running when Acrobat starts up. I'm able to add a button to the add-ons toolbar without a custom icon but once I try to specify an icon I get an error that doesn't tell me much.

       

      GeneralError: Operation failed.

      App.addToolButton:1824:Folder-Level:App:config.js

       

      Here is my code:

       

      var myIcon;

       

      var importIcons = app.trustedFunction(function() {

           app.beginPriv();

       

           // Create a document

           var myDoc = app.newDoc();

       

           // import icon (20x20 pixels) from the file specified

           myDoc.importIcon("myIcon", "/some/path/plus.jpg", 0);

         

           // convert the icon to a stream.

           myIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));

       

           // close the doc now that we have grabbed the icon stream

           myDoc.closeDoc(true);

       

           app.endPriv();

      });

       

      importIcons();

       

      // add buttons to add-ons toolbar

      app.addToolButton({

           cLabel: "Test1",

           cName: "testButton1",

           oIcon: myIcon,

           cExec: "app.alert('hello');",

           cTooltext: "Test1",

           cEnable: true,

           cMarked: true,

           nPos: 0

      });

       

      My image is 20x20 px and a .jpg. I'm also wondering if there's a way to accomplish this without having to create a dummy empty document just in order to call importIcon() and getIcon(). Any help is appreciated.

        • 1. Re: Creating add-ons toolbar button with custom icon
          try67 MVP & Adobe Community Professional

          Are you adding your code to the built-in config.js file? If so, that's a bad idea. You should create your own js file.

          Beside that I'm not seeing any major issues. I tried your code on my machine and it worked fine...

          1 person found this helpful
          • 2. Re: Creating add-ons toolbar button with custom icon
            try67 MVP & Adobe Community Professional

            PS. Short of converting your image to a Hex string, which is super-complicated and annoying, your solution is the easiest one I've came across so far.

            1 person found this helpful
            • 3. Re: Creating add-ons toolbar button with custom icon
              cschmelter Level 1

              I'm on Mac and it's my own config.js file in /Applications/Adobe Acrobat DC/Adobe Acrobat.app/Contents/Resources/JavaScripts. There was not a config.js in there before I created mine. So with my code you were able to see a custom icon that you tested with? Also, do you know if there's a way to not have to create a dummy new document in order to import the icon?

              • 4. Re: Creating add-ons toolbar button with custom icon
                try67 MVP & Adobe Community Professional

                Do you have more than 1800 lines of code in that file?

                And yes, it did work for me using a custom icon I saved in a local folder. And no, I don't think you can do it without creating a dummy document.

                1 person found this helpful
                • 5. Re: Creating add-ons toolbar button with custom icon
                  cschmelter Level 1

                  Yes, I have more than 1800 lines. Is that a problem?

                  • 6. Re: Creating add-ons toolbar button with custom icon
                    try67 MVP & Adobe Community Professional

                    No, that's fine, I was just a bit surprised... So what's the full error message you're getting, and to which line in the code does it refer, exactly? Also, does it work if you remove the oIcon parameter?

                    1 person found this helpful
                    • 7. Re: Creating add-ons toolbar button with custom icon
                      cschmelter Level 1

                      The full error message I'm getting is just what I posted in my original question:

                       

                      GeneralError: Operation failed.

                      App.addToolButton:1824:Folder-Level:App:config.js

                       

                      app.addToolButton({
                          cLabel: "Test1",
                          cName: "testButton1",
                          oIcon: myIcon,
                          cExec: "app.alert('hello');",
                          cTooltext: "Test1",
                          cEnable: true,
                          cMarked: true,
                          nPos: 0
                      });
                      

                       

                      Line 9 above (nPos) is really line 1824 in my JavaScript file. Yes, the button shows up fine when I comment out the icon line (line 4 above).

                      • 8. Re: Creating add-ons toolbar button with custom icon
                        try67 MVP & Adobe Community Professional

                        In that case there's more than likely a problem with the file-path you're using. Are you sure you're using the correct syntax?

                        The best way to find out is to put a PDF in the same folder, then open it in Acrobat and run this code from the JS Console:

                        this.path

                        It will print out the correct file-path you need to use in the importIcon method.

                        1 person found this helpful
                        • 9. Re: Creating add-ons toolbar button with custom icon
                          cschmelter Level 1

                          I was using /Users/.. but when I opened a PDF in the same directory this.path started with /Macintosh HD/Users/..

                           

                          So I tried that and I still get the same result.

                          • 10. Re: Creating add-ons toolbar button with custom icon
                            cschmelter Level 1

                            It's also interesting that when I run app.getPath("user", "javascript") in the console I get:

                             

                            GeneralError: Operation failed.

                            App.getPath:1:Console undefined:Exec

                            2

                            undefined

                             

                            but I get a value for "app":

                             

                            app.getPath("app", "javascript")

                            /Macintosh HD/Applications/Adobe Acrobat DC/Adobe Acrobat.app/Contents/Resources/JavaScripts/

                            • 11. Re: Creating add-ons toolbar button with custom icon
                              cschmelter Level 1

                              It doesn't seem like it's a file path issue because when I intentionally try a file path that doesn't exist I get an error back from the iconStreamFromIcon() function:

                               

                              Util.iconStreamFromIcon:1801:Folder-Level:App:config.js

                               

                              and when I put in a valid path I don't get an error back from iconStreamFromIcon().

                              • 12. Re: Creating add-ons toolbar button with custom icon
                                try67 MVP & Adobe Community Professional

                                The getPath result is expected. There's only an app version of this folder, not a user version.

                                I'm sorry, but I'm out of ideas. Could be a Mac-specific bug, as it's working fine in my Windows version, as I've said.

                                Maybe try the hex-string approach I mentioned before. That way you won't need to use an external image file, or a dummy document, either.

                                1 person found this helpful
                                • 13. Re: Creating add-ons toolbar button with custom icon
                                  Thom Parker Adobe Community Professional

                                  You'll find a tutorial and a tool for creating toolbar Icons here:

                                  Alerts, Popups, and Other Devices for Interacting with the User

                                   

                                  You'll also find lots of folder level automation tools that use toolbar buttons with icons.  If you look at them you'll notice not a single one depends on an external file. Loading files at startup is iffy, and create dependencies that add difficulty to maintaining and transferring scripts.

                                   

                                  Here are some free examples of tools with toolbar buttons:

                                  Free Acrobat Automation Tools

                                  1 person found this helpful
                                  • 14. Re: Creating add-ons toolbar button with custom icon
                                    cschmelter Level 1

                                    Thanks for the reply Thom, but unfortunately I don't have a subscription so can't see the examples.

                                    • 15. Re: Creating add-ons toolbar button with custom icon
                                      DimitriM Level 3

                                      You are not able to download the Free tools?  The first link was to an article on UI elements but the second one with sample tools using custom toolbar buttons is Free ( does not require a membership)

                                       

                                      Free Acrobat Automation Tools

                                       

                                      Any error messages when you tried to download the Free tools?

                                       

                                      Hope this helps,

                                       

                                      Dimitri

                                      pdfscripting.com

                                      1 person found this helpful
                                      • 16. Re: Creating add-ons toolbar button with custom icon
                                        cschmelter Level 1

                                        I must have only looked at the first link. I see the free tools now. Thanks guys! I'll check them out.

                                        • 17. Re: Creating add-ons toolbar button with custom icon
                                          cschmelter Level 1

                                          I was able to download them and checked out one of the examples of building a button with an icon using a hex string. So I tried that route and it looks some sort of icon or part of it but it doesn't really look like my image. Perhaps there's an issue with my hex string or with my image but the image is 20x20 px. I've tried a .jpg and a .png but get the same result. Are there any other image specs I need to satisfy for an icon image? What is the preferred way to get the hex string? I'm getting the hex string from the image via Java.

                                          • 18. Re: Creating add-ons toolbar button with custom icon
                                            Thom Parker Adobe Community Professional

                                            It's critical that the image dimensions match the specified size in the icon object. And that the image data is ARGB. 4 bytes/8 hex digits per pixel. Otherwise, all the pixels get shifted.

                                             

                                            This is the same data returned from the util.iconStreamFromIcon() function.

                                             

                                            Since there are a few different bits that have to come together correctly, I created a set of examples/tools that do it for you, and show how it's done. But it's true the good stuff is paid content.

                                            1 person found this helpful
                                            • 19. Re: Creating add-ons toolbar button with custom icon
                                              Thom Parker Adobe Community Professional

                                              Here is the spec for the icon stream object,which is what you pass into the app.addToolButton() function. This is the same object returned from the util.iconStreamFromIcon() function.

                                               

                                              Acrobat DC SDK Documentation

                                              • 20. Re: Creating add-ons toolbar button with custom icon
                                                cschmelter Level 1

                                                I'd like to inspect one of the images from the free examples you pointed me to since it displays correctly and my icon does not. Do you know if the original images are available anywhere or are the hex strings in the JS files the only option?

                                                • 21. Re: Creating add-ons toolbar button with custom icon
                                                  Thom Parker Adobe Community Professional

                                                  Those were custom icons created by me. The images in other formats are not available.  But I don't see why that would be helpful. All you need to do is convert the pixel data into the specified format   

                                                  1 person found this helpful
                                                  • 22. Re: Creating add-ons toolbar button with custom icon
                                                    JR_Boulay Adobe Community Professional

                                                    Here is a free PDF file that convert GIF, PNG, JPG… images to a usable format to embed into JavaScripts : Fichiers partagés - Acrobat.com

                                                     

                                                    1 person found this helpful
                                                    • 23. Re: Creating add-ons toolbar button with custom icon
                                                      cschmelter Level 1

                                                      I tried it out on a couple different .png files and a .jpg file and the icon still doesn't display correctly. I'm assuming there's something wrong with the image format I'm starting with but I'm not much of an image expert. Any way you can send me an image you've used with your tool that displays correctly so I can compare the specs to my images?

                                                      • 25. Re: Creating add-ons toolbar button with custom icon
                                                        Thom Parker Adobe Community Professional

                                                        It is extremely unlikely that there is something wrong with the image format you are starting with. But you probably do have an issue with the way the Hex data is being produced. How exactly are you creating the hex data? Please be specific

                                                        • 26. Re: Creating add-ons toolbar button with custom icon
                                                          cschmelter Level 1

                                                          I've tried generating the hex string in Acrobat using JS:

                                                           

                                                          // create a document
                                                          var myDoc = app.newDoc();
                                                          
                                                          
                                                          // import icon from file
                                                          myDoc.importIcon("myIcon", "/some/path/myicon.png", 0);
                                                          
                                                          // convert the icon to a stream
                                                          myIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));
                                                          
                                                          // get hex string
                                                          var hex = myIcon.read();
                                                          
                                                          // print hex string
                                                          console.println(hex);
                                                          
                                                          
                                                          
                                                          

                                                           

                                                          then plugging that hex into:

                                                          var oIcon = {
                                                               count: 0, 
                                                               width: 20, 
                                                               height: 20,
                                                               read: function(nBytes) {
                                                                    return hex.slice(this.count, this.count += nBytes);
                                                               }
                                                          };
                                                          

                                                           

                                                          then passing oIcon to the addToolButton() function. The result was that the image did not display correctly at all. Just a bunch of random black pixels.

                                                           

                                                          I then tried the tool suggested above on the same icon image:

                                                           

                                                          https://forums.adobe.com/external-link.jspa?url=https%3A%2F%2Ffiles.acrobat.com%2Fa%2Fprev iew%2F1e380a30-b776-49cb-8652-…

                                                           

                                                          That gave a similar result. I then tried generating the hex string using the PDF tool above on the image provided further up in this thread:

                                                           

                                                          https://forums.adobe.com/servlet/JiveServlet/showImage/2-10069142-1382811/Compteur-de-mots .png

                                                           

                                                          That gave a similar result. Here is the hex string the tool generated for the image above:

                                                           

                                                          0000000000000000ff8b1100ff8b1100ff970e1dff970e1dff860000ff860000ffc3091affc3091affa00000ff a00000ffa40802ffa40802ff9a0000ff9a0000ff940003ff940003ffa30712ffa30712ff9f0307ff9f0307ffa2 0407ffa20407ffa30005ffa30005ff990000ff990000ff9b0a06ff9b0a06ff920100ff920100ffb00e1effb00e 1eff8e0000ff8e0000ffa31201ffa3120100000000000000000000000000000000ff8b1100ff8b1100ff970e1d ff970e1dff860000ff860000ffc3091affc3091affa00000ffa00000ffa40802ffa40802ff9a0000ff9a0000ff 940003ff940003ffa30712ffa30712ff9f0307ff9f0307ffa20407ffa20407ffa30005ffa30005ff990000ff99 0000ff9b0a06ff9b0a06ff920100ff920100ffb00e1effb00e1eff8e0000ff8e0000ffa31201ffa31201000000 0000000000ff951b00ff951b00ff7b0100ff7b0100ff950b1aff950b1affae1529ffae1529ffa50000ffa50000 ffbe050dffbe050dff980000ff980000ffa50b04ffa50b04ff990008ff990008ff9f040eff9f040eff9f0408ff 9f0408ff920000ff920000ffa10003ffa10003ffa9060affa9060aff900000ff900000ff960501ff960501ff98 0007ff980007ffbc1b2bffbc1b2bff7e0000ff7e0000ff9e240aff9e240aff951b00ff951b00ff7b0100ff7b01 00ff950b1aff950b1affae1529ffae1529ffa50000ffa50000ffbe050dffbe050dff980000ff980000ffa50b04 ffa50b04ff990008ff990008ff9f040eff9f040eff9f0408ff9f0408ff920000ff920000ffa10003ffa10003ff a9060affa9060aff900000ff900000ff960501ff960501ff980007ff980007ffbc1b2bffbc1b2bff7e0000ff7e 0000ff9e240aff9e240aff840001ff840001ffb1272effb1272e00000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000ff90180cff90180cff930000ff930000ff840001ff840001ffb1 272effb1272e000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff 90180cff90180cff930000ff930000ff970d13ff970d13ff840001ff8400010000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000ff830a00ff830a00ff970100ff970100ff970d13ff 970d13ff840001ff84000100000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000ff830a00ff830a00ff970100ff970100ffaf0009ffaf0009ffa80002ffa80002000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000ff9f070eff9f070effaa0009ffaa0009 ffaf0009ffaf0009ffa80002ffa800020000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000ff9f070eff9f070effaa0009ffaa0009ffab0004ffab0004ffb6030fffb6030f00000000 0000000000000000000000000000000000000000ff4c2b21ff4c2b21ff6e1417ff6e1417ff650b0eff650b0eff 6e1324ff6e1324ff600919ff600919ff6d2227ff6d2227ff5c1115ff5c1115ff6a1b23ff6a1b23ff702029ff70 2029ff461d19ff461d19000000000000000000000000000000000000000000000000ff8e0000ff8e0000ffa000 00ffa00000ffab0004ffab0004ffb6030fffb6030f000000000000000000000000000000000000000000000000 ff4c2b21ff4c2b21ff6e1417ff6e1417ff650b0eff650b0eff6e1324ff6e1324ff600919ff600919ff6d2227ff 6d2227ff5c1115ff5c1115ff6a1b23ff6a1b23ff702029ff702029ff461d19ff461d1900000000000000000000 0000000000000000000000000000ff8e0000ff8e0000ffa00000ffa00000ffaa090cffaa090cffa00002ffa000 02000000000000000000000000000000000000000000000000ff4f1914ff4f1914ff7b1d1cff7b1d1cff781a19 ff781a19ff6e1e25ff6e1e25ff58090fff58090fff6b1617ff6b1617ff72181bff72181bff75141eff75141eff 6f0e1aff6f0e1aff511d1cff511d1c000000000000000000000000000000000000000000000000ffa30002ffa3 0002ffae0a09ffae0a09ffaa090cffaa090cffa00002ffa0000200000000000000000000000000000000000000 0000000000ff4f1914ff4f1914ff7b1d1cff7b1d1cff781a19ff781a19ff6e1e25ff6e1e25ff58090fff58090f ff6b1617ff6b1617ff72181bff72181bff75141eff75141eff6f0e1aff6f0e1aff511d1cff511d1c0000000000 00000000000000000000000000000000000000ffa30002ffa30002ffae0a09ffae0a09ffa00002ffa00002ffa0 0002ffa00002000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff a80307ffa80307ff970000ff970000ffa00002ffa00002ffa00002ffa000020000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000ffa80307ffa80307ff970000ff970000ffa10305ff a10305ff9c0000ff9c000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000ffa30300ffa30300ffa40100ffa40100ffa10305ffa10305ff9c0000ff9c0000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000ffa30300ffa30300ffa40100ffa40100 ff9d0001ff9d0001ffa40609ffa40609000000000000000000000000000000000000000000000000ff58231fff 58231fff5d2115ff5d2115ff5c1f13ff5c1f13ff47150eff47150eff63322bff63322bff601b13ff601b13ff5f 1510ff5f1510ff65181aff65181aff65161eff65161eff4a181bff4a181b000000000000000000000000000000 000000000000000000ffa30300ffa30300ffa40100ffa40100ff9d0001ff9d0001ffa40609ffa4060900000000 0000000000000000000000000000000000000000ff58231fff58231fff5d2115ff5d2115ff5c1f13ff5c1f13ff 47150eff47150eff63322bff63322bff601b13ff601b13ff5f1510ff5f1510ff65181aff65181aff65161eff65 161eff4a181bff4a181b000000000000000000000000000000000000000000000000ffa30300ffa30300ffa401 00ffa40100ff9e0000ff9e0000ffa60700ffa60700000000000000000000000000000000000000000000000000 ff542617ff542617ff61210bff61210bff691a09ff691a09ff6d1911ff6d1911ff771c16ff771c16ff6d1004ff 6d1004ff73160aff73160aff5c130aff5c130aff632720ff632720ff582821ff58282100000000000000000000 0000000000000000000000000000ffa80005ffa80005ffa60004ffa60004ff9e0000ff9e0000ffa60700ffa607 00000000000000000000000000000000000000000000000000ff542617ff542617ff61210bff61210bff691a09 ff691a09ff6d1911ff6d1911ff771c16ff771c16ff6d1004ff6d1004ff73160aff73160aff5c130aff5c130aff 632720ff632720ff582821ff582821000000000000000000000000000000000000000000000000ffa80005ffa8 0005ffa60004ffa60004ffa20400ffa20400ff9d0000ff9d000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000ffa80005ffa80005ffa60004ffa60004ffa20400ffa20400ff9d 0000ff9d0000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff a80005ffa80005ffa60004ffa60004

                                                           

                                                          I also tried generating the hex string from the image file path in Java.

                                                          • 27. Re: Creating add-ons toolbar button with custom icon
                                                            cschmelter Level 1

                                                            Here is a screen shot of Acrobat that shows the icon hex PDF generator tool and how after I select the file it loads it in fine and then on the Quick Tools toolbar you can see the red icon does not display correctly.

                                                             

                                                            Screenshot at Dec 29 11-52-41.png

                                                            • 28. Re: Creating add-ons toolbar button with custom icon
                                                              Thom Parker Adobe Community Professional

                                                              You're first bit of code is correct.  This is the same code that JR is using in his tool. However, you can't just assume the dimensions are 20x20. You actually have to check.  The image is "off" because the dimensions are off.


                                                              this.importIcon("myIcon"); 
                                                              myIcon = util.iconStreamFromIcon(this.getIcon("myIcon"));

                                                               

                                                              var width = myIcon.width;

                                                              var height = myIcon.height;

                                                               

                                                              You can do all this from the console widow using any open document. Unless you are creating an automation script, there is no need to make the new document. 

                                                              1 person found this helpful
                                                              • 29. Re: Creating add-ons toolbar button with custom icon
                                                                cschmelter Level 1

                                                                Hmm, myIcon.width and myIcon.height return 40 but the image is really 20 x 20 pixels. When I try specifying a width and height of 40 in oIcon I get:

                                                                 

                                                                GeneralError: Operation failed.

                                                                App.addToolButton:1898:Folder-Level:App:config.js

                                                                • 30. Re: Creating add-ons toolbar button with custom icon
                                                                  Thom Parker Adobe Community Professional

                                                                  toolbar icons are 20x20 or less. That's why you see the error. If the conversion is saying the image is 40x40 pixels then that's what it is. You may be seeing the 20x20 in a different parameter this isn't real pixels, such as points.  Edit the image in a tool that will allow you to resize it in true pixels.

                                                                  • 31. Re: Creating add-ons toolbar button with custom icon
                                                                    cschmelter Level 1

                                                                    It's definitely already 20 x 20 pixels which is why I'm confused.

                                                                    Screenshot at Dec 29 13-24-16.png

                                                                    • 32. Re: Creating add-ons toolbar button with custom icon
                                                                      try67 MVP & Adobe Community Professional

                                                                      I warned you, didn't I?

                                                                      Actually, I don't think the issue is with the image size. It's with the format.

                                                                      I had encountered similar issues when I messed around with these icons and finally I had to write a Java application that converts PNG images to an ARGB hex-string. But they come out rotated and flipped, so I have to rotate and flip them the other way in advance for them to come out correctly. It's a total nightmare...

                                                                       

                                                                      Here's the hex-string I generated for your image:

                                                                      "FFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000F FA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFFFFFFFFFA30000FFA30000FFA 30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30 000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30 000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000F FA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA 30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFF FFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA3000 0FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA3000 0FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000F FA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFF FFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30 000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30 000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA3000 0FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000F FA30000FFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA 30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFA30000FFA30000FFA30000FFA30000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA30000FFA3000 0FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000F FA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFFFFFFFFFA30000FFA 30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30000FFA30 000FFA30000FFA30000FFA30000FFA30000FFA30000FFFFFFFF"

                                                                      1 person found this helpful
                                                                      • 33. Re: Creating add-ons toolbar button with custom icon
                                                                        Thom Parker Adobe Community Professional

                                                                        I've never had an issue with Acrobat converting the image size incorrectly. I'd like to see if I have this same issue. Can you send me your png?  Send it too support@pdfscripting.com

                                                                        1 person found this helpful
                                                                        • 34. Re: Creating add-ons toolbar button with custom icon
                                                                          JR_Boulay Adobe Community Professional

                                                                          you can see the red icon does not display correctly.

                                                                          You must create and design icons at their final size: 20 x 20 pixels.

                                                                          Otherwise, pixels are downsampled to fit this size, causing blurring and aliasing.

                                                                          • 35. Re: Creating add-ons toolbar button with custom icon
                                                                            JR_Boulay Adobe Community Professional

                                                                            Here is the source JS file: https://adobe.ly/2q1y84S

                                                                            of this free tool: https://www.abracadabrapdf.net/?p=964

                                                                            which use one of above icons.

                                                                            • 36. Re: Creating add-ons toolbar button with custom icon
                                                                              JR_Boulay Adobe Community Professional

                                                                              It's definitely already 20 x 20 pixels which is why I'm confused.

                                                                              About Apple Preview, aka "PDF Killer":

                                                                              - Preview.app - Killer of PDF Files - KHKonsulting LLC

                                                                              - https://www.abracadabrapdf.net/?p=558

                                                                               

                                                                              • 37. Re: Creating add-ons toolbar button with custom icon
                                                                                cschmelter Level 1

                                                                                I tried emailing the icon to the email address you supplied but I'm getting the following error:

                                                                                 

                                                                                [personal information removed per policy - https://forums.adobe.com/docs/DOC-3731]

                                                                                [This is an open forum, not Adobe support, please do not post personal information]

                                                                                [If you are posting using email, please turn your 'sig file' function OFF for posting]

                                                                                [WARNING - Adobe does not use Skype, so BEWARE of someone contacting you via Skype and claiming to be from Adobe]

                                                                                 

                                                                                No such user here (in reply to RCPT TO

                                                                                   command)

                                                                                 

                                                                                Is this the correct address?

                                                                                • 38. Re: Creating add-ons toolbar button with custom icon
                                                                                  cschmelter Level 1

                                                                                  Thanks for the links but the first one doesn't apply since I'm dealing with a PNG, not a PDF in Preview.

                                                                                  • 39. Re: Creating add-ons toolbar button with custom icon
                                                                                    Thom Parker Adobe Community Professional

                                                                                    cschmelter  Just message me on this site. Put the cursor over my name and click on the Message button.

                                                                                    1 person found this helpful
                                                                                    1 2 Previous Next