3 Replies Latest reply on Feb 21, 2011 6:35 AM by try67

    JS and PDF generation

    kUr4m4

      Lets say I want to share a pdf but I want whoever is visioning it to have JS enabled, otherwise i don't want to display the pdf. Can I share a 'blank' pdf with only JS code in it that will generate a new pdf with all the text I want in it? Will this just provide a blank pdf if JS is disabled?

       

      thank you for your help

        • 1. Re: JS and PDF generation
          try67 MVP & Adobe Community Professional

          It's possible to generate a PDF using JavaScript (not in Reader, though),

          but it's very limited and cumbersome.

          A better option is to use an "envelope" to show a blank PDF that can only be

          opened when JavaScript is enabled. I know some people have been developing

          such a tool, perhaps they could shed more light on this technique.

          1 person found this helpful
          • 2. Re: JS and PDF generation
            kUr4m4 Level 1

            thank you for the quick reply!

             

            Following that line of thought, I could probably even display an alternative version, asking for JS to be enabled if the user wishes to view the content of the pdf?

            • 3. Re: JS and PDF generation
              try67 MVP & Adobe Community Professional

              Yes, you can use layers to do that and then create a small script that shows

              the layer with the actual content. However, I think this can also be

              manually done with JS disabled, so it's not 100% fool-proof.