BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi,

I'm using ODS PDF to create report with a watermark, per: http://support.sas.com/kb/24/319.html

This has been working for a while, then it broke suddenly.  And after slamming my head against the keyboard for a couple hours last night, it looks like what broke it was the addition of a footnote statement that had in-line formatting!

So here is working code:

proc template;
  define style watermark;
  parent=styles.printer;
  style header from header /
        background=_undef_;
  style body from document /
        background=_undef_
        backgroundimage="D:\junk\clocks.jpg";
end;
run;

ods pdf file="test.pdf" style=watermark; 
footnote1 "I have a simple footnote";
proc report data = sashelp.class nowd;
run;
ods pdf close;

But if I replace the footnote to have one with in-line formatting to add page x of y, the watermark disappears!

ods escapechar='^';
footnote1 "Page ^{thispage} of ^{lastpage}";

Anyone care to replicate the result, and better yet maybe explain why this is happening?

I'm on SAS 9.3, Win XP.

Thanks,

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  This is a known interaction:

34573 - Images and URL links might be missing from PDF output when using the LASTPAGE inline functio...

  There are some workarounds listed in the note. You might consider making an RTF file and then doing the creation to PDF from there.

cynthia

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  This is a known interaction:

34573 - Images and URL links might be missing from PDF output when using the LASTPAGE inline functio...

  There are some workarounds listed in the note. You might consider making an RTF file and then doing the creation to PDF from there.

cynthia

Quentin
Super User

Thanks so much Cynthia, that's definitely what I'm seeing.

Where were you last night, when I was banging my ahead against the keyboard.:smileygrin:

This morning, I started debugging from scratch with a simpler example, and started commenting out code, thinking "Well, it couldn't be the footnote statement", and there it was....   Which is a lesson it feels like I re-learn every 3 months.  When faced with odd results, debug calmly and methodically....  Last night I had 100 different theories for what could have been wrong (my ods PATH is being reset somewhere, there is a problem with my PROC TEMPLATE code, the .jpg file is corrupted, I should restart the SAS session, etc etc), but was too tired and frustrated to just debug.

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
Cynthia_sas
SAS Super FREQ

Hi, Quentin:

  Sorry about the head banging. I've done my share of head banging and of calm debugging and in my opinion, the calm debugging (aided by a search of Tech Support notes on support.sas.com), is the winner in solving problems and also, no bruises on the forehead! 😉

cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2121 views
  • 0 likes
  • 2 in conversation