Download presentation
Presentation is loading. Please wait.
Published byLuke Allen Modified over 8 years ago
1
Publishing to PDF SNUG Quarter 2
2
Overview n What is PDF? n Why use PDF? n Creating PDF files with SAS Software n Issues n Advanced PDF files with SAS Software n Conclusion n References
3
What is PDF? n PDF stands for Portable Document Format n Standard created by Adobe® n PDF relies on the imaging model of the PostScript® language to describe text and graphics in a device-independent and resolution-independent manner
4
Why use PDF? n Used frequently on the web n Platform independent n Usually displayed with Adobe® Acrobat® n High quality printing - WYSIWYG
5
Creating PDF files with SAS n SAS Software Version 8.2 includes PDF as an ODS output option n Options exist to control the appearance
6
Example 1 ods pdf file='d:\SNUG\Example1.pdf'; proc print data=sasuser.houses; run; ods pdf close;
7
Creating PDF files with SAS n Title Statements n Labels n Formats
8
Example 2 ods pdf file='d:\SNUG\Example2.pdf'; options nodate nonumber; title 'Housing Report'; footnote 'SNUG Quarter 2 2001'; proc print data=sasuser.houses label; format sqfeet comma8.1 price dollar15.2; run; ods pdf close;
9
Creating PDF files with SAS n All PROCs, including SAS/GRAPH
10
Example 3 ods pdf file='d:\SNUG\Example3.pdf'; proc tabulate data=sasuser.houses; class style; var price; keylabel n='Count' min='Lowest’ max='Highest'; table style,n price*(min max); proc gchart data=sasuser.houses; vbar style / sumvar=price type=mean; run; quit; ods pdf close;
11
Creating PDF files with SAS n The Report Bookmarks can be controlled with the same options as ODS HTML n ODS PROCLABEL controls the first level n CONTENTS= option on the Procedure controls the second level
12
Example 4 ods pdf file='d:\SNUG\Example4.pdf'; title 'Housing Listing'; ods proclabel='Housing Report'; proc print data=sasuser.houses contents='Listing'; run; ods pdf close;
13
Creating PDF files with SAS n CONTENTS=‘’ should remove the second level entirely
14
Example 5 ods pdf file='d:\SNUG\Example5.pdf'; title 'Housing Listing'; ods proclabel='Housing Report'; proc print data=sasuser.houses contents=''; run; ods pdf close;
15
Issues n contents=‘’ does not work properly for PDFs n PDF file is damaged when starting Adobe® Acrobat® n all outstanding issues - yet none critical n Tech Support Documentation is coming...
16
Advanced PDF files with SAS n PROC TEMPLATE can be used to modify the report’s appearance, too n SAS/IntrNet users can create dynamic PDF files directly to _webout
17
Example 6 proc template; define style style.colours; parent=styles.default; style Body from Document / background=white foreground=black; style Data from Cell / background=cx7bb600 foreground=black bordercolor=black; style Header from HeadersAndFooters / background=cx551d55 foreground=white bordercolor=black; end; run;
18
Example 6 ods pdf file='d:\SNUG\Example6.pdf' style=style.colours; title; footnote; ods proclabel='Housing Report'; proc print data=sasuser.houses contents='Listing' noobs label; run; ods pdf close;
19
Example 7 ods pdf file=_webout; title 'Housing Listing'; footnote; proc print data=sasuser.houses; run; ods pdf close;
20
Complete PDF Control n Uncompressed PDF files are purely ASCII text n You can therefore create these with the DATA STEP and PUT statements n For a very rigid report structure, this may be the only way, yet still has all of the benefits n Development time is considerably higher
21
Conclusion n Creating PDF files with SAS Software Version 8.2 is easy n PDF reports enable your user base to view results in a standard environment n PDF files are becoming the standard for the Web - and with SAS/IntrNet Software you can create these dynamically
22
References n http://www.adobe.com n http://www.sas.com n Tech Support Document is coming...
23
Publishing to PDF Questions???
24
Publishing to PDF Presentation available shortly on our website: http://www.qual-it.com.au michael_matthews@qual-it.com.au
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.