Usage Note 24319: How to add a watermark to your ODS PDF output
The sample code on the Full Code tab shows how to place an image behind a table in the ODS PDF destination using the style attribute BACKGROUNDIMAGE.
Please note that the size of the image is not controlled by SAS®, and the background image should adhere to the parameters described in SAS Note 46333, "Recommended attributes for images included in PDF files generated by ODS."
When you use PROC TEMPLATE code to add a background image to SAS/GRAPH® output, specify the following graphics option:
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The test code creates a PDF file that uses a background image on the document. For an ODS GRAPHICS procedure like SGPLOT, set transparency within the procedure as there is not a transparency setting within the style definition that will apply.
ods path (prepend) work.template(update) sashelp.tmplmst;
proc template;
define style watermark_pearl;
parent=styles.pearl;
style Table from Table /
cellpadding = 5pt
borderspacing = .05pt
borderwidth = .1pt
frame = box
bordercolor = cx919191
bordercollapse = collapse
backgroundcolor=_undef_ ;
class Header /
color = cx000000
backgroundcolor = _undef_
bordercolor = cxB0B7BB
bordercollapse = collapse;
class body from document /
backgroundimage="<directory>\draft.png";
end;
run;
title;
options nodate nonumber;
ods html close;
ods pdf file="watermark.pdf" style=watermark_pearl notoc;
proc report data = sashelp.class;
run;
goptions transparency;
proc gchart data=sashelp.class;
vbar age;
run;
quit;
proc sgplot data=sashelp.class noopaque nowall pad=0;
vbar age / transparency=.5;
run;
ods pdf close;
Type: | Usage Note |
Priority: | low |
Topic: | System Administration ==> Printing Third Party ==> Output ==> PDF SAS Reference ==> ODS (Output Delivery System) Query and Reporting ==> Creating Reports ==> Graphical
|
Date Modified: | 2005-08-19 16:25:06 |
Date Created: | 2005-07-29 08:28:01 |