Skip to main content
4everJang
Legend
Jul 8, 2022 8:24 AM UTC
Answered

How can I set PDF properties in scripting ?

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 is closed to new replies. Start a new post to keep the conversation going.
frameexpert
frameexpertCorrect answer
Community Expert
Jul 15, 2022 7:10 PM UTC

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;
www.frameexpert.com

3 replies

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
Jul 15, 2022 7:10 PM UTC

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
www.frameexpert.com
4everJang
4everJangAuthor
Legend
Jul 18, 2022 11:38 AM UTC

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
Community Expert
Jul 15, 2022 1:39 PM UTC

Hi Jang,

 

Do you mean the PDF setup in the Format menu?

O the File info in the File menu?

 

Best regards

 

Winfried

Translate