ODS PDF Tip Sheet

99 downloads 21167 Views 2MB Size Report
Page 1 ... something to take home, type in, and try. This tip sheet presents the most common ... ensures uniform table width from page to page within a single ...
PDF

  ODS pdf Tip Sheet ODS PDF TipSheet Sheet ODS ODS PDF PDF Tip Tip Sheet ODS PDF Tip Sheet Global Options: PDF Security Global Global Options: Options: PDF PDF Security Security Global Options: PDF Security

Action Syntax Action Action Syntax Syntax Action Syntax

pdfsecurity=none| low| high pdfsecurity=none| pdfsecurity=none| low| low| high high pdfsecurity=none| low| high Setting this option the global OPTIONS Setting Setting this this option option on onon the the global global OPTIONS OPTIONS

ods pdf ; ods ods pdf pdf ; ; ods pdf ;

Setting this option on the global OPTIONS statement can control the level ofPDF PDF document statement statement can can control control the the level level ofofPDF document document statement can control the level of PDF document encryption. The default value isnone. none. Using low encryption. encryption. The The default default value value isisnone. Using Using low low encryption. The default value is none. Using low gives 40-bit encryption; high is128-bit 128-bit encryption. gives gives 40-bit 40-bit encryption; encryption; high high isis128-bit encryption. encryption. gives 40-bit encryption; high is 128-bit encryption.

Ifyou you use the ODS PDF statement without If use use the the ODS ODS PDF PDF statement statement without without IfIfyou you use the ODS PDF statement without an action or options, then itopens opens the PDF an an action action or or options, options, then then it it opens the the PDF an action or options, then it opens the PDF PDF destination and creates PDF output. destination destinationand andcreates createsPDF PDFoutput. output. destination and creates PDF output.

This option requires Adobe Acrobat 5.0 and higher. This This option option requires requires Adobe Adobe Acrobat Acrobat 5.0 5.0 and and higher. higher. This option requires Adobe Acrobat 5.0 and higher.

pdfpassword=(open=”password” owner= pdfpassword=(open=”password” pdfpassword=(open=”password” owner= owner= pdfpassword=(open=”password” owner= ”password”) ”password”) ”password”) ”password”) Setting this the global OPTIONS Setting Setting this this on onon the the global global OPTIONS OPTIONS Setting this on the global OPTIONS statement controls the Owner and Open statement statement controls controls the the Owner Owner and and Open Open statement controls the Owner and Open passwords on aPDF PDF document. You can set passwords passwords on on a a PDF document. document. You You can set set passwords on a PDF document. You can can set one orboth bothoptions optionsinin any order. Ifyou you set one one or any order. order. If set set one ororboth both options options in in any any order. IfIfyou you set both options, the passwords cannot be the both both options, options, the the passwords passwords cannot cannot be be the the both options, the passwords cannot be the same. same. same. same. There are more global options for PDF There There are are more more global global options options for for PDF PDF There are more global options for PDF security available that control printing, security security available available that that control control printing, printing, security available that control printing, copying, and changing the contents ofthe the copying, copying, and and changing changing the the contents contents of copying, and changing the contents ofofthe the PDF file. For acomplete complete description, refer PDF PDF file. file. For For a a complete description, description, refer refer PDF file. For a complete description, refer ®® ® documentation. tothe theBase BaseSAS SAS documentation. documentation. to totothe the Base Base SAS SAS® documentation.

Global OPTIONS Statement Usage Global Global OPTIONS OPTIONS Statement Statement Usage Usage Global OPTIONS Statement Usage options pdfsecurity=low options options pdfsecurity=low pdfsecurity=low options pdfsecurity=low pdfpassword=(open=”open” pdfpassword=(open=”open” pdfpassword=(open=”open” pdfpassword=(open=”open” owner=”owner”); owner=”owner”); owner=”owner”); owner=”owner”);

Column for logo, address, and trademark info. Column Column for for logo, logo, address, address, and and trademark trademark info. info. Column for logo, address, and trademark info.

ODSPDF PDF ODS ODS PDF ODS PDF TipSheet Sheet Tip Tip Sheet Tip Sheet

Actions Actions Actions Actions close close close close close the PDF destination and the file that close close the the PDF PDF destination destination and and the the file file that that close the PDF destination and the file that isassociated associated with it. You cannot print the is is associated with with it. it. You You cannot cannot print print the the is associated with it. You cannot print the file until you close the destination. file file until until you you close close the the destination. destination. file until you close the destination. exclude exclusions(s) | all |none exclude exclude exclusions(s) exclusions(s) || |all all |none |none exclude exclusions(s) all |none excludes output objects from the PDF excludes excludes output output objects objects from from the the PDF PDF excludes output objects from the PDF destination. destination. destination. destination.

This sheet places frequently used This This tip tiptip sheet sheet places places frequently frequently used used This tip sheet places frequently used information in one place, on one sheet information informationininone oneplace, place,on onone onesheet sheet ofofof information in one place, on one sheet of paper, so you don’t have to search through the paper, paper,sosoyou youdon’t don’thave havetotosearch searchthrough throughthe the paper, so you don’t have to search through the online documentation. It also gives you online onlinedocumentation. documentation.ItItalso alsogives givesyou you online documentation. It also gives you something totake take home, type and try. something something tototake home, home, type type in, in,in, and and try. try. something to take home, type in, and try.

select selections(s) | all |none select select selections(s) selections(s) || |all all |none |none select selections(s) all |none selects output objects for the PDF selects selects output output objects objects for for the the PDF PDF selects output objects for the PDF destination. destination. destination. destination.

This sheet presents the most common This This tip tiptip sheet sheet presents presents the the most most common common This tip sheet presents the most common statements and attributes used increating creating statements statements and and attributes attributes used used inincreating statements and attributes used in creating output with the ODS PDF statement. This output output with with the the ODS ODS PDF PDF statement. statement. This This output with the ODS PDF statement. This statement opens, manages, closes the PDF statement statement opens, opens, manages, manages, ororor closes closes the the PDF PDF statement opens, manages, or closes the PDF destination, which produces PDF output, aform form destination, destination, which which produces produces PDF PDF output, output, aaform destination, which produces PDF output, a form ofoutput output that isread read Adobe Acrobat and ofofoutput that that isisread by byby Adobe Adobe Acrobat Acrobat and and of output that is read by Adobe Acrobat and other applications. The ODS PDF statement other other applications. applications. The The ODS ODS PDF PDF statement statement isisis other applications. The ODS PDF statement is part ofthe the ODS printer family ofstatements. statements. part part ofofthe ODS ODS printer printer family family ofofstatements. part of the ODS printer family of statements.

show show show show writes the current selection orexclusion exclusion list writes writes the the current current selection selection or list list writes the current selection ororexclusion exclusion ®® ® list for the PDF destination to the SAS log. for for the the PDF PDF destination destination to to the the SAS SAS log. ® log. for the PDF destination to the SAS log. SAS Institute Inc. World Headquarters For complete information refer tothe the For For complete complete information information refer refer totothe For 8000 complete®www.sas.com/offices information refer to the ® ® +1 919 677 Base SAS 9.2 documentation Base Base SAS SAS 9.2 documentation documentation atatat ® 9.2

Base SAS 9.2 documentation at http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies. Copyright © 2013, SAS Institute Inc. All rights reserved. 556036_02.10

  ODS ODS PDF ODS ODS PDF PDF Tip Tip Sheet Sheet ODS PDF PDF Tip Tip Sheet Sheet Basic Basic Usage Usage Basic Basic Usage Usage ods ods pdf pdf ; ; ods ods pdf pdf ; ; … …procedure … procedure name name … …… … …procedure procedure name name ods ods pdf pdf close; close; ods ods pdf pdf close; close;

Common Common Options Options Common Common Options Options anchor=”anchor-name” anchor=”anchor-name” anchor=”anchor-name” anchor=”anchor-name” specifies specifies thethe the root root name name forfor for the the anchor anchor tagtag tag specifies specifies the root root name name for the the anchor anchor tag that that identifies identifies each each output output object. object. that that identifies identifies each each output output object. object.

ODS ODS PDF PDF Example Example ODS ODS PDF PDF Example Example This This code code snippet snippet will will create create thethe the output output filefile filefile This This code code snippet snippet will will create create the output output “output.pdf” “output.pdf” with with awith simple simple table table of five offive five “output.pdf” “output.pdf” with aasimple a simple table table of of five observations. observations. observations. observations. ods ods pdf pdf file="output.pdf"; file="output.pdf"; ods ods pdf pdf file="output.pdf"; file="output.pdf"; proc proc print print data=sashelp.class(obs=5); data=sashelp.class(obs=5); proc proc print print data=sashelp.class(obs=5); data=sashelp.class(obs=5); run; run; run; run; ods ods pdf pdf close; close; ods ods pdf pdf close; close;

columns=n columns=n columns=n columns=n specifies specifies thethe the number number ofof columns ofcolumns toto create tocreate specifies specifies the number number ofcolumns columns tocreate create onon on each each page page ofof output. ofoutput. on each each page page ofoutput. output.

startpage=never startpage=never | no no | now now | yes yes startpage=never startpage=never | |no no | |now | now | |yes | yes controls controls page page breaks. breaks. controls controls page page breaks. breaks. style=style-definition style=style-definition style=style-definition style=style-definition specifies specifies thethe the style style definition definition toto use. touse. specifies specifies the style style definition definition touse. use. text=”text-string” text=”text-string” text=”text-string” text=”text-string” inserts inserts a text text string into into your your output. output. inserts inserts aatext a string text string string into into your your output. output. uniform uniform uniform uniform ensures ensures uniform uniform table table width width from from page page totototo ensures ensures uniform uniform table table width width from from page page page page within within a single single table. table. page page within within aasingle a single table. table.

author=”author-text” author=”author-text” author=”author-text” author=”author-text” inserts inserts thethe the text text string string that that you you specify specify asasasas inserts inserts the text text string string that that you you specify specify author, author, into into the the metadata metadata ofof aoffile. file. author, author, into into the the metadata metadata aofafile. a file. keywords=”keywords-text” keywords=”keywords-text” keywords=”keywords-text” keywords=”keywords-text” inserts inserts into into the the output output file’s file’s metadata, metadata, a aa a inserts inserts into into the the output output file’s file’s metadata, metadata, string string ofof keywords. ofkeywords. The The keywords keywords enable enable a aa a string string ofkeywords. keywords. The The keywords keywords enable enable document document management management system system toto do todo topictopicdocument document management management system system todo do topictopicbased based searches. searches. based based searches. searches.

PDF PDF Table Table ofofof Contents Contents Options Options PDF PDF Table Table of Contents Contents Options Options pdftoc=n pdftoc=n pdftoc=n pdftoc=n controls controls thethe the table table ofof contents ofcontents node node controls controls the table table ofcontents contents node node expansion expansion ofof aofPDF PDF file. file. expansion expansion aofaPDF a PDF file. file. n specifies thethe the level level ofof node ofnode expansion expansion inininin nnspecifies nspecifies specifies the level level ofnode node expansion expansion thethe the table table ofof contents. ofcontents. The The larger larger thethe the the table table ofcontents. contents. The The larger larger the number, number, thethe the greater greater thethe the node node expansion. expansion. number, number, the greater greater the node node expansion. expansion. For For example, example, n=0 n=0 is complete, iscomplete, full full For For example, example, n=0 n=0 is iscomplete, complete, full full expansion expansion ofof all ofall nodes, nodes, while while n=3 n=3 limits limits thethe the expansion expansion ofall all nodes, nodes, while while n=3 n=3 limits limits the expansion expansion toto the tothe first first three three nodes. nodes. expansion expansion tothe the first first three three nodes. nodes.

subject=”subject-text” subject=”subject-text” subject=”subject-text” subject=”subject-text” inserts inserts thethe the text text string string that that you you specify specify asas the asthe inserts inserts the text text string string that that you you specify specify asthe the subject, subject, into into the the metadata metadata ofof aoffile. file. subject, subject, into into the the metadata metadata aofafile. a file.

contents=no contents=no | yes yes contents=no contents=no | |yes | yes controls controls thethe the generation generation ofof aofprintable printable table table controls controls the generation generation aofaprintable a printable table table ofof contents. ofcontents. ofcontents. contents. file=”filename” file=”filename” file=”filename” file=”filename” specifies specifies thethe the name name ofof the ofthe file file that that will will specifies specifies the name name ofthe the file file that that will will contain contain thethe the output output tables. tables. contain contain the output output tables. tables.

PDF PDF Metadata Metadata Options Options PDF PDF Metadata Metadata Options Options

This This code code snippet snippet will will create create thethe the output output filefile filefile This This code code snippet snippet will will create create the output output “style.pdf” “style.pdf” with with awith simple simple table table of five offive five observations observations “style.pdf” “style.pdf” with aasimple a simple table table of of five observations observations using using thethe the style style template template “Ocean”: “Ocean”: using using the style style template template “Ocean”: “Ocean”: ods ods pdf pdf file="style.pdf" file="style.pdf" style=Ocean; style=Ocean; ods ods pdf pdf file="style.pdf" file="style.pdf" style=Ocean; style=Ocean; proc proc print print data=sashelp.class(obs=5); data=sashelp.class(obs=5); proc proc print print data=sashelp.class(obs=5); data=sashelp.class(obs=5); run; run; run; run; ods ods pdf pdf close; close; ods ods pdf pdf close; close;

title=”title-text” title=”title-text” title=”title-text” title=”title-text” inserts inserts thethe the text text string string that that you you specify specify asas the asthe inserts inserts the text text string string that that you you specify specify asthe the title, title, into into the the metadata metadata ofof aoffile. file. title, title, into into the the metadata metadata aofafile. a file.

PDF PDF Compression Compression Option Option PDF PDF Compression Compression Option Option compress=n compress=n compress=n compress=n controls controls thethe the compression compression ofof aofPDF PDF file. file. controls controls the compression compression aofaPDF a PDF file. file. Compression Compression reduces reduces thethe the size size of the ofthe file. file. Compression Compression reduces reduces the size size of ofthe the file. file. n specifies thethe the level level ofof compression. ofcompression. The The nnspecifies nspecifies specifies the level level ofcompression. compression. The The larger larger thethe the number, number, thethe the greater greater thethe the larger larger the number, number, the greater greater the compression. compression. For For example, example, n=0 n=0 is compression. compression. For For example, example, n=0 n=0 isisis completely completely uncompressed, uncompressed, and and n=9 n=9 is the isthe completely completely uncompressed, uncompressed, and and n=9 n=9 is isthe the maximum maximum compression compression level. level. The The default default maximum maximum compression compression level. level. The The default default value value is is n=6. isn=6. value value isn=6. n=6. This This option option will will take take precedence precedence over over thethe the This This option option will will take take precedence precedence over over the DEFLATION DEFLATION global global option. option. DEFLATION DEFLATION global global option. option.

notoc notoc notoc notoc specifies specifies that that ODS ODS PDF PDF omit omit thethe the table table ofofofof specifies specifies that that ODS ODS PDF PDF omit omit the table table contents contents that that is produced isproduced byby by default. default. contents contents that that is isproduced produced by default. default. bookmarkgen= bookmarkgen= nono no | yes yes bookmarkgen= bookmarkgen= no | |yes | yes controls controls thethe the generation generation ofof bookmarks ofbookmarks inin ainaina a controls controls the generation generation ofbookmarks bookmarks PDF PDF file. file. PDF PDF file. file. bookmarklist= bookmarklist= hide hide | none none | show show bookmarklist= bookmarklist= hide hide | |none | none | |show | show specifies specifies whether whether oror not ornot tonot generate togenerate and and specifies specifies whether whether ornot to togenerate generate and and display display thethe the list list oflist bookmarks ofbookmarks forfor for afor PDF PDF display display the list of ofbookmarks bookmarks aaPDF a PDF file. file. file. file.