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

Thom Parker's PDF Stamps - "Security settings prevent access to this property or method"

Community Beginner ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Hello -

I've been successful in creating a custom Balloon stamp, using the guidelines from Thom Parker'as excellent book "All ABout PDF Stamps..".

However, when I move my stamp PDF to my user's PC, I get this error:

NotAllowedError: Security settings prevent access to this property or method.

Info.exhibit:8:App UserData2:Calculate

Again, it works on my PC.

I've been searching and working on this on and off for a few weeks, and I am not making progress. Do I need to go the "trusted function" route?

What am I missing?

Thanks very much in Advance,

Brian

TOPICS
Acrobat SDK and JavaScript , Windows

Views

858

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Nov 02, 2017 Nov 02, 2017

If you are using the stamp in Acrobat Reader, then saving stamp data into the document is a problem.  There are some possible replacements, but it all depends on your objective.

Is it important to save the data on a per document basis? or could it be saved globally? Does data need to persist across Acrobat sessions? You might want to re-read the Chapter 8 section "Data Storage and Persistence"

Votes

Translate

Translate
Community Expert ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Are you trying to use this stamp with the free Adobe Reader? If so, you cannot write to document properties (via the Info object). See here for more information: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#t=Acro12_MasterBook%2FJ...

Votes

Translate

Translate

Report

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
Community Beginner ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Yes, we're using the free Adobe Reader DC.  I'm beginning to see that things have changed a bit since the book was published...

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Actually, this is not a new restriction. It's been a while since I worked through the book, but I am pretty confident that Thom does talk about this restriction.

Votes

Translate

Translate

Report

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 ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

What is the version on of Acrobat/Reader on the user's PC?

If it is 7.0 or greater, then you you need to use the privileged context.

What is the script that is running in the stamp?

Votes

Translate

Translate

Report

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
Community Beginner ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

The script is:

var cAsk = "Enter Number" ;

var cTitle = "Balloon Number:  ";

if(event.source.forReal && (event.source.stampName == "#Balloon"))

{

  var cMsg = app.response(cAsk, cTitle);

  event.value = cMsg;

  event.source.source.info.exhibit = cMsg;

}

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

If you're only interested in the stamp, and not in saving the user's input into the file's metadata, just remove that line from the code.

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

If you are using the stamp in Acrobat Reader, then saving stamp data into the document is a problem.  There are some possible replacements, but it all depends on your objective.

Is it important to save the data on a per document basis? or could it be saved globally? Does data need to persist across Acrobat sessions? You might want to re-read the Chapter 8 section "Data Storage and Persistence"

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
Community Beginner ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Ah Ha!!  That is my issue - I did not realize that this script was saving the input locally for potential re-use later (as in an auto-incrementing balloon number).  I should know better than to just copy code without thoroughly understanding it.

Try67, thanks for your insight, and Thom, thanks for the insight and your great book. I haven't gotten to Chapter 8 because I thought I didn't need to worry about more complicated programming. I guess I did, so I could create simpler programming...

Thanks to everyone who replied - this sure is a responsive and thoughtful community!

Brian

Votes

Translate

Translate

Report

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
New Here ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

LATEST

Thanks all for the great information. Thom thanks a bunch!

Votes

Translate

Translate

Report

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