7 Replies Latest reply on Sep 2, 2015 7:07 AM by ohpayk

    How to enter a facsimile signature image into a stamp.

    ohpayk Level 1

      I have a stamp that opens a dialog box to fill out. I was looking for the property type (or specific code necessary) to enter an image of a signature into a stamp. I want the user to be able to select the image file themselves.

       

      Well I should preface that and say I've created a button to do this to test the code then will be switching to a stamp once I understand everything (to avoid the hassle of stamp name issues).

        • 1. Re: How to enter a facsimile signature image into a stamp.
          George_Johnson MVP & Adobe Community Professional

          Will the user need to select from among multiple images, or will they only use a particular one?

          • 2. Re: How to enter a facsimile signature image into a stamp.
            ohpayk Level 1

            They will select one from their computer. The goal is to create one stamp that can be used by multiple people.

            • 3. Re: How to enter a facsimile signature image into a stamp.
              George_Johnson MVP & Adobe Community Professional

              OK, one more question. Does this need to work with Reader, or just Acrobat? It's possible with Reader, but the signature would have to be converted to PDF first, which is fairly easy to do.

               

              It sounds like you already know how to set up a button that prompts the user to import an image file to be used for the button icon. The user would just have to open the stamp file, click the button, and select the image/PDF of the signature and save the stamp file. From then on, whenever the stamp is placed, the signature image will be included. They'll just need to know where the stamp file is installed whenever they need to change it.

               

              If instead you mean that multiple people will be using a particular user's account in a computer, and each will need to select their signature when they use the stamp, that's possible but a bit more complicated. Post again if you need more help with any of this.

              • 4. Re: How to enter a facsimile signature image into a stamp.
                ohpayk Level 1

                I actually know how to create the button but not prompt for picture files. I know how to prompt for text and checkboxes. It does not need to be compatible with reader, all users are on Acrobat. Does this make sense?

                • 5. Re: How to enter a facsimile signature image into a stamp.
                  George_Johnson MVP & Adobe Community Professional

                  To prompt for an image, set up the button so the Layout is set to "Icon only" and use the following Mouse Up script for the button:

                   

                  event.target.buttonImportIcon();

                   

                   

                  It will default to the PDF format, but the user can select from any file format that Acrobat knows how to convert to PDF, which includes the most common image formats.

                   

                  Note that there are a number of options for scaling the button icon. It's common to set it to scale proportionally, scale always, and fit to bounds.

                  • 6. Re: How to enter a facsimile signature image into a stamp.
                    ohpayk Level 1

                    That is useful to know. I'm trying to figure out where it would go in the scheme of things. I can create a stand alone button but what about say adding that to a dialogue. I don't know even know if this is possible. Here is sample code

                     

                    // Dialog Definition 
                    var oDlg = {
                        
                        commit: function(dialog) {
                            var data = dialog.store(); 
                            this.pNumber = data[ "pnum"]; 
                            this.sNumber = data[ "snum"];
                            var oRslt = dialog.store();
                            this.approved = oRslt["capp"];
                            this.furnish = oRslt["cfur"];
                            this.revise = oRslt["crev"];
                            this.rejected = oRslt["crej"];
                            this.image = oRslt["imag"]; // I am assuming this is going to the variable for the image.
                        },
                        description: {
                            name: "Test Dialog", elements: [ {
                                type: "view", elements: [
                                    { 
                                        name: "Enter the Project Number:", 
                                        type: "static_text", 
                                    },
                                    { 
                                        item_id: "pnum", 
                                        type: "edit_text", 
                                        char_width: 15 
                                    },
                                    { 
                                        name: "Enter the Submittal Number:", 
                                        type: "static_text",
                                    },
                                    { 
                                        type: "edit_text",   
                                        item_id: "snum", 
                                        char_width: 15 
                                    },
                                    {
                                        type: "check_box",
                                        item_id: "capp",
                                        name: "Approved",
                                        width: 102,
                                        height: 23,
                                    },
                                    {
                                        type: "check_box",
                                        item_id: "cfur",
                                        name: "Furnish as Corrected",
                                        width: 102,
                                        height: 23,
                                    },
                                    {
                                        type: "check_box",
                                        item_id: "crev",
                                        name: "Revise and Resubmit",
                                        width: 102,
                                        height: 23,
                                    },
                                    {
                                        type: "check_box",
                                        item_id: "crej",
                                        name: "Rejected",
                                        width: 102,
                                        height: 23,
                                    },
                                   
                                    { type: "ok_cancel", },
                                ]
                            },]
                        }
                    };  
                    
                    • 7. Re: How to enter a facsimile signature image into a stamp.
                      George_Johnson MVP & Adobe Community Professional

                      What I was suggesting is that you don't set the button icon on the stamp at the time it's applied, but rather the user would set the button icon when they install the stamp file on their system, so they only have to do it once as opposed to each time the stamp is applied. The code I posted earlier would go in the Mouse Up event of the button on the stamp page.

                      • 8. Re: How to enter a facsimile signature image into a stamp.
                        ohpayk Level 1

                        I'm not quite sure I understand where the code for the import picture would be placed within the dialog box. When the user uses the stamp the dialog box will pop up prompting for this information which will fill the stamp out. I notice there isn't a type for importing images so I'm confused where it would be placed in regards to everything. Thank you for your help thus far.