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

Script to show who exported PDF?

Advocate ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

Is there a script to embed in the PDF via Note or layer who exported a file?  I have a script in indesign that displays this but when you export the PDF it of course does not show up since its on the paste board.  I dont want it to add size via WxL to the label i just want it there so its know who sent files out.  Is this even possible?

TOPICS
Scripting

Views

246

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

People's Champ , Jan 26, 2017 Jan 26, 2017

var kws = app.activeDocument.metadataPreferences.keywords;

app.activeDocument.metadataPreferences.keywords = kws.concat ( app.userName );

Votes

Translate

Translate
People's Champ ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

var kws = app.activeDocument.metadataPreferences.keywords;

app.activeDocument.metadataPreferences.keywords = kws.concat ( app.userName );

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
Advocate ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

This is perfect thanks. I have one question.  WHen i change keywords to author it does not display the persons name anymore instead of the name it put NaN.  do you know why this is?

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
People's Champ ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

Why, no that doesn't make sense to me. It's true that "author" expects a string but even using concat shouldn't force a type conversion to Number.

Anyway, try this instead:

app.activeDocument.metadataPreferences.author = app.userName;

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
Advocate ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

LATEST

Ok i was just wondering. That fixed it.  Either way both correct.  Thanks for coming to the rescue again.   I think what was going on was that i kept the app.userName inside the ( ).  when i tried it before.

Thanks Again

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