Hello,
i have a datastep that opens _WEBOUT
data _NULL_; set webOutput; file _WEBOUT; put l; run;
In the "data webOutput(keep = l);" Step i create HTML which has serveral dropdown-menues and a button on the top of the page. The rest of the page is an iframe which has a table, generated by an proc tabulate.
Now i want to export this table to PDF. So i created in a macro an ods-statement, that creates a pdf:
ods pdf file='/mypdf.pdf'; %proc_tabulate_code; ods pdf close;
But how can i forward the PDF to the browser? I have found some examples - e.g.:
data _null_; rc = stpsrv_header('Content-type','application/pdf'); rc = stpsrv_header('Content-disposition','attachment; filename=temp.pdf'); run; ods listing close; ods PDF body=_webout ; proc print data=sashelp.class; run; ODS PDF CLOSE;
But always the PDF is shown on the HTML-Page or in the STP-Log as Binary-Code.
Already clear why (the PDF is written to _webout - and _webout is already open) - But how can i close _webout? Or what other possibilities exists?
Thank you very much
Kind regards
George
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!
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.