Skip to main content
Miyano_
Inspiring
October 12, 2018
Answered

export PDF options

  • October 12, 2018
  • 1 reply
  • 638 views

Hi everybody,

Im working on a script that I am saving in .pdf format. I want to get the lightest file possible but even if I tick all the possible options to reduce the files weight, the file I get with script in the end is much heavier than the file I can get when saving manually. I think I have missed options

Here is options of my script :

saveOpts.compatibility = PDFCompatibility.ACROBAT6;

saveOpts.preserveEditability = false;

//saveOpts.bleedLink = false;

//=======================  COMPRESSION =========================== 

saveOpts.colorCompression = CompressionQuality.AUTOMATICJPEGMINIMUM;

saveOpts.colorDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; 

saveOpts.colorDownsampling = 100; 

saveOpts.colorDownsamplingImageThreshold = 150; 

//----------------------------------------------------------------------------------------------------------- 

saveOpts.grayscaleCompression = CompressionQuality.AUTOMATICJPEGMINIMUM;

saveOpts.grayscaleDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; 

saveOpts.grayscaleDownsampling = 150; 

saveOpts.grayscaleDownsamplingImageThreshold = 225; 

//----------------------------------------------------------------------------------------------------------- 

saveOpts.monochromeCompression = MonochromeCompression.CCIT4; 

saveOpts.monochromeDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; 

saveOpts.monochromeDownsampling = 300; 

saveOpts.monochromeDownsamplingImageThreshold = 450; 

   

saveOpts.saveMultipleArtboards = true;

saveOpts.artboardRange = myRange;

  

saveOpts.generateThumbnails = false;   

saveOpts.optimization = true;

saveOpts.preserveEditability = true;

saveOpts.compressArt = true;

saveOpts.pDFAllowPrinting = PDFPrintAllowedEnum.PRINT128HIGHRESOLUTION;

I want to export with this options: (sorry it is French)

Thank you very much for your answer and help !

Have a nice day,

Miyano

This topic has been closed for replies.
Correct answer CarlosCanto

Save a pdf preset with all the options of your choice, then use the preset name in your script

var preset = 'myPDFpreset';

saveOpts.pDFPreset = preset;

1 reply

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
October 12, 2018

Save a pdf preset with all the options of your choice, then use the preset name in your script

var preset = 'myPDFpreset';

saveOpts.pDFPreset = preset;

Miyano_
Miyano_Author
Inspiring
October 15, 2018

THANK YOU VERY MUCH ! You are a genius ! ^^

Have a nice day !

Miyano