Skip to main content
4everJang
Legend
April 27, 2023
Question

Saving to PDF from script - how do I set the PDF version ?

  • April 27, 2023
  • 1 reply
  • 629 views

I have a script that saves my files to PDF, using the following lines:

	var oaParams = GetSaveDefaultParams( );
	
	i = GetPropIndex( oaParams, Constants.FS_FileType );
	oaParams[i].propVal.ival = Constants.FV_SaveFmtPdf;
	
	i = GetPropIndex( oaParams, Constants.FS_PDFUseDistiller );
	oaParams[i].propVal.ival = 0;

My customer now asks me to generate PDF 1.7 instead of the current 1.6. Does anyone know where I can set this property ? 

This topic has been closed for replies.

1 reply

frameexpert
Community Expert
Community Expert
April 27, 2023

There is roundabout way to get there, but I don't think it can be done through ExtendScript. If your code doesn't use Distiller, I am pretty sure it uses the current settings in the Publish panel. When you edit the sts and its PDF area, you will see a preset, for example, Standard. You can load custom job options files by clicking the browse button.

 

On my system, the job options files are located here: C:\ProgramData\Adobe\Adobe PDF\Settings. If you open one of the joboptions file with a text editor, you will see this line (around line 12):

 

/CompatibilityLevel 1.6

 

You can try changing this and running your script again and see if it gives you the result you want. When you open your PDF, go to File > Properties and choose the Description tab. It will show you the PDF version at the lower part of the dialog box.

frameexpert
Community Expert
Community Expert
April 27, 2023

I tried this and it didn't change the PDF Level in the resulting PDF. Apparently, I am missing something.

K.Daube
Community Expert
Community Expert
May 2, 2023

... and how about just setting up an appropriate JobOptions file with all the required properties - and then referring to it?