BookmarkSubscribeRSS Feed
sorosch
Fluorite | Level 6

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

1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
If this is a stored process question or a SAS/IntrNet question, then you might want to post the question in the Stored Process Community https://communities.sas.com/t5/SAS-Stored-Processes/bd-p/sas_stored_processes or open a track with Tech Support.

Cynthia

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1197 views
  • 0 likes
  • 2 in conversation