Afternoon,
I've tried searching this issue and cannot come across a reliable solution. I am generating a PDF using the ODS LAYOUT absolute. So far I am able to generate 6 pages of PDF with the information I need and everything laid out how I want. The problem is now what appears an issue when trying to generate a 7th page. Below is the test code I am working with. This of course is nested within my ods pdf statements and I have my options, margins, and style set up before initiating ods pdf. I haven't included the full set of code because this is the only portion causing me issues. All of my ods start widths and heights are 8.49/10.99 inches, respectively. As you can see, the below code is just generating a header and footer for the document and is consistent with the header/footer code on the preceding 6 pages of the PDF. I haven't even tried to add content between the header and footer yet. When I run the program I get the following warnings:
ods startpage = now;
ods layout start width=8.49in
height=10.99in;
%*header;
ods region x = 0.50 in
y = 0.40 in;
ods text = "^{style[font_face='arial' fontsize=20pt
just=l fontweight=bold] Title}";
ods region x = 0.53 in
y = 0.75 in;
ods text = "^{style[font_face='arial' fontsize=16pt
just=l fontweight=bold] Subtitle}";
ods region x = 0.50 in
y = 0.95 in;
ods text="__________________________________________________________________________________________________________";
%*end header;
%*footer;
ods region x = 0.50 in
y = 10.50 in;
ods text = "^{style[font_face='arial' fontsize=9pt just=left fontstyle=italic]Name}";
ods region x = 0.50 in
y = 10.50 in;
ods text = "^{style[font_face='arial' fontsize=9pt just=center fontstyle=italic]Page ^{thispage} of ^{lastpage}}";
ods region x = 0.50 in
y = 10.50 in
width = 7.25 in;
ods text = "^{style[font_face='arial' fontsize=9pt just=right fontstyle=italic]Contract Number: ######}";
%*end footer;
ods layout end;
Now when I try to run the entire program, I get the following warnings:
WARNING: HEIGHT exceeds available space for PDF destination. This option will be ignored.
and then these for the three ods region statements for the 'footer' portion of the code above:
WARNING: Invalid Y specified for PDF destination. This option will be ignored.
WARNING: Invalid Y specified for PDF destination. This option will be ignored.
WARNING: Invalid Y specified for PDF destination. This option will be ignored.
The output then puts the footer information above my header information.:
I have tried troubleshooting this all day and cannot for the life of me figure out why SAS is complaining as all this set-up code is identical to the preceding page set ups. I have even set this up in an entirely separate SAS session with my options/margins/style and it runs fine so there doesn't appear to be any issues with the syntax...
Thanks,
Lucas
Totally understand the need to view all code, it's just a complicated program calling data from Excel, lots of manipulation and macros and such so I was hoping someone might have experienced something similar.
I believe I have narrowed the issue down to a proc gchart I am producing on page 6 of my PDF, the size of which may be encroaching the ods region on the subsequent page I am creating. If I comment out the proc gchart everything runs fine and is positioned exactly as specified with no warnings.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.