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

How can I set PDF properties in scripting ?

Advocate ,
Jul 08, 2022 Jul 08, 2022

Hello scripter friends,

 

Has anyone tried (with success) to set PDF properties via ExtendScript ?

 

I have retrieved the PDFDocInfo property, which is a propVal with an ssval string array inside. But when I push strings into the ssval array and then use Doc.SetProps( ) FM freezes. Apparently, I need to use some other method to push the string values into the PDFDocInfo property, but I have always struggled with the many variations of TypedVal elements. If anyone has a useful idea let me know.

 

Thanks in advance

 

Jang

TOPICS
PDF output , Scripting
271
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

correct answers 1 Correct answer

Community Expert , Jul 15, 2022 Jul 15, 2022

I do something like this:

 

var strings;
	
strings = doc.PDFDocInfo;
strings.push ("Subject");
strings.push ("The Subject");
strings.push ("Author");
strings.push ("The Author");
doc.PDFDocInfo = strings;
Translate
Community Expert ,
Jul 15, 2022 Jul 15, 2022

Hi Jang,

 

Do you mean the PDF setup in the Format menu?

O the File info in the File menu?

 

Best regards

 

Winfried

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
Community Expert ,
Jul 15, 2022 Jul 15, 2022

I do something like this:

 

var strings;
	
strings = doc.PDFDocInfo;
strings.push ("Subject");
strings.push ("The Subject");
strings.push ("Author");
strings.push ("The Author");
doc.PDFDocInfo = strings;
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
Advocate ,
Jul 18, 2022 Jul 18, 2022
LATEST

Hi Rick,

I didn't know it was this easy. Funny that the complexer method via SetProps does not work - it just freezes FM.

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