Skip to main content
4everJang
Legend
July 8, 2022
Answered

How can I set PDF properties in scripting ?

  • July 8, 2022
  • 2 replies
  • 401 views

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

This topic has been closed for replies.
Correct answer frameexpert

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;

2 replies

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
July 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;
4everJang
4everJangAuthor
Legend
July 18, 2022

Hi Rick,

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

Community Expert
July 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