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.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: 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.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: 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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1928 views
  • 0 likes
  • 2 in conversation