Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I add an import image button field to a fillable form?

Guest
Apr 07, 2016 Apr 07, 2016

How do I add an import image button field to a fillable form?

TOPICS
Acrobat SDK and JavaScript
319
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2016 Apr 07, 2016
LATEST

If it has to work with Reader, there is only a method to import from an existing PDF, but it's often easy to convert an image to PDF these days. Acrobat allows you to import from anything it knows how to convert to PDF, which includes the common image formats. You can use the following JavaScript in the Mouse Up event of a button that configured with a layout other than "Label only", usually "Icon only":

// Mouse Up script for a button

event.target.buttonImportIcon();

This is the bare essential, but you can expand on this so that the return value is checked for errors and provide a means to reset the button icon. Post again if you have any questions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines