Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

PDF Security

SAS 9.2 introduces security options for creating PDF documents with ODS statements. The options allow you to password protect a PDF file and control if copying from the document is allowed.

PDFSECURITY and PDFPASSWORD are system options that must be used together. The first one controls the encryption level and the second one allows us to specify the password required to open the file.

NOPDFCOPY denies users the ability to copy text and graphic content from the document.

Consider the following example:

options pdfpassword=(open='amadeus')
ods listing close;
ods pdf file='d:sastipssecure_file.pdf' compress=9 contents=yes;
proc print; run;
proc print data=sashelp.class; run;
ods pdf close; ods listing;

This example also includes further useful options that are not related to security but help us control the display of the PDF file created:

  • PDFPAGEVIEW controls how the file will be displayed by default on screen. We can set it up so the page is always displayed at 100% or fits the screen area.
  • The COMPRESS option on the ODS statement generates an output file that is compressed. The number included specifies the compression level, 0 being no compression and 9 being the highest compression available.
  • We can also request an automatic table of contents to be created on the document with the CONTENTS option.

New options have been implemented in SAS 9.2 to easily control the appearance and security of PDF documents. For more information refer to the SAS online help.

Note: the version of Adobe Acrobat Reader is very important when using these options. Some of them can only be used from v5.0 onwards.