How to remove date and page number from the PDF destination? I do use : options nonumber nodate; This works for the HTML destination but not for the PDF. In the top upper corner there is the date and page number in the format:
Thursday, January 9, 2025 02:19:16 PM 1
Below is the code:
ODS PDF FILE="&reports_new.ARIMA_output_MFED_model_stats_yearly.pdf" STARTPAGE=NO;
ods select StationarityTests ParameterEstimates FitStatistics ;
proc arima data=data_out.SP_sum1
plots=(residual(smooth) forecast(forecasts))
;
WHERE date_sas >="01JAN1970"d AND MONTH(date_sas)=&Last_month.;
identify var=Log_of_Valuation_factor stationarity=(adf) ;
estimate p=1 q=0 method=ml outest=est_sum /*noint*/;
outlier id=date_sas maxnum=5;
forecast lead=15 interval=year id=date_sas BACK=0
out=r_Log_of_Valuation_factor(RENAME=(FORECAST=F_sum STD=STD_sum
L95=LCI_sum U95=UCI_sum RESIDUAL=R_sum))
;
run;
ODS PDF CLOSE;
There is nothing in the log that indicates that the " options nonumber nodate;" were ignored. There is also no errors or warnings.
Hi @Yury2, you're on the right track, those are indeed the options you'd want to use to remove the date and page number. I don't see the options in the sample code provided so I'm not sure where they were inserted. However, keep in mind that these options have to be set before the PDF is produced. Here is an example I tested that worked:
option nonumber nodate;
ods pdf file="~/class.pdf";
proc print data=sashelp.class;
run;
ods pdf close;
Hi @Yury2, you're on the right track, those are indeed the options you'd want to use to remove the date and page number. I don't see the options in the sample code provided so I'm not sure where they were inserted. However, keep in mind that these options have to be set before the PDF is produced. Here is an example I tested that worked:
option nonumber nodate;
ods pdf file="~/class.pdf";
proc print data=sashelp.class;
run;
ods pdf close;
Thank you for your suggestion. I believed that options nodate nonumber; are global and I submitted them separately and before submitting the above code in Web Studio. That turns out to be a wrong way of doing it because it looks like Web Studio resets these options to default at each submission. I followed your suggestion and submitted these options together with the code and this worked. Again, thank you for your suggestion.
Hi @Yury2, that's right in SAS Studio there is wrapper code included with every run. It includes a global OPTIONS statement with DATE and NUMBER (among other things). You can view this wrapper code in SAS Studio by navigating to More Options (three dot menu at the top right of the editor window) > Open in a browser tab > Log.
My LOG for the program above has this statement at line 14:
14 options dtreset date number;
Thank you for your explanation.
Hello @Yury2,
Glad to see that antonbcristina's solution worked for you. Then it would be fair and help later readers if you marked her most helpful reply as the accepted solution, not your own "thank you" post. Could you please change that? It's very easy: Select her post as the solution after clicking "Not the Solution" in the option menu (see icon below) of the current solution.
(The same goes for your other thread, by the way.)
Hello FreelanceReinh. Thank you for pointing this out. I would be more than happy to do this but when I click on the option menu on the left of the post I do not see the option "Not a Solution". I must be missing something. Please, advise.
@Yury2 wrote:
Hello FreelanceReinh. Thank you for pointing this out. I would be more than happy to do this but when I click on the option menu on the left of the post I do not see the option "Not a Solution". I must be missing something. Please, advise.
How strange. I've just accepted a solution to a thread I had started and this is how the option menu of the accepted solution looks like (red highlighting added):
I'm not sure how long this option is available, but I think that at least today's solutions should have it. [Edit:] Indeed, this menu item is shown even for a solution I accepted more than eight years ago.
I changed the solution settings to Cristina's solution.
Great!. Thank you.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Ready to level-up your skills? Choose your own adventure.