7 Replies Latest reply on Feb 3, 2015 11:02 AM by Laubender

    PDF export with security settings

    MikeBrog Level 1

      Using JavaScript to export PDFs.  Export works fine.  Security in the PDF is not working.

       

      ID CS5.5

       

      This is the snippet of code I'm using to apply settings to the PDF:

       

      with(app.pdfExportPreferences){

      cropMarks = false;

      registrationMarks = false;

      acrobatCompatibility = AcrobatCompatibility.acrobat5;

      colorBitmapCompression = BitmapCompression.autoCompression;

      colorBitmapQuality = CompressionQuality.low;

      colorBitmapSampling = Sampling.bicubicDownsample;

      colorBitmapSamplingDPI = 100;

      compressionType = PDFCompressionType.compressObjects;

      compressTextAndLineArt = true;

      cropImagesToFrames = true;

      grayscaleBitmapCompression = BitmapCompression.autoCompression;

      grayscaleBitmapquality = CompressionQuality.low;

      grayscaleBitmapSampling = Sampling.bicubicDownsample;

      grayscaleBitmapSamplingDPI = 100;

      monochromeBitmapCompression = MonoBitmapCompression.ccit4;

      monochromeBitmapSampling = Sampling.bicubicDownsample;

      monchromeBitmapSamplingDPI = 300;

      optimizePDF = true;

      subsetFontsBelow = 100;

      useSecurity = true;

      viewPDF=true;

      disallowPrinting=false;

      disallowCopying=true;

      disallowChanging=true;

      openDocumentPassword = "password"

      changeSecurityPassword = "password"

      }

       

      Most (if not all) of these settings are working with the exception of the security settings.

       

      disallowPrinting=false;

      disallowCopying=true;

      disallowChanging=true;

      openDocumentPassword = "dj2575!!"

      changeSecurityPassword = "dj2575!!"

       

      Am I missing something in the code?

       

      Thank you for any input.