BookmarkSubscribeRSS Feed
superbug
Quartz | Level 8

 The code below provide me landscape orientation

	options orientation=LANDSCAPE topmargin=0.25in bottomargin=0.25in rightmargin=0.25in leftmargin=0.25in;
	ods listing close;
	ods pdf file="....\Result_SAS.pdf" ;
	proc print data=summary noobs;
	id pd;
    by id ;
	var  v1 v2 v3;
	pageby id;
	run;

ODS pdf close;
ods pdf;
run;

use the code above, I got the table presented as below in PDF

superbug_1-1682695894993.png

 

But I need the table in the produced PDF show as in the picture below

superbug_0-1682695800073.png

 

Any help would much appreciated!

8 REPLIES 8
Reeza
Super User
Isn't that portrait orientation but it'll show as upright in PDF but print as desired?
superbug
Quartz | Level 8

@Reeza  Thanks much for looking into my question!

The desired is when you view an portrait orientation table after 90 degree counterclockwise rotation.

 

I opened the PDF generated using the code in Adobe. In view-->rotation view-->counterclockwise, I got the desired format. 

I am wondering how to get the desired format using SAS.

 

Thanks!

Quentin
Super User

I don't see a way to do this.  But it also seems like an unusual thing to want to do.

 

I think the output you want is landscape, but rotated as you say so that when you view it in a PDF viewer, it is sideways.

 

If you're viewing this on a screen, why would you want to view it sideways, instead of as a landscape page?  Note also that most PDF viewers have a rotate option, so user would be able to rotate it as they like.  Similar to how if you print a hard copy, you can rotate it however you like.

 

You might want to submit a ballot item (https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas) to suggest SAS add an option to allow perhaps a rotation argument for the ORIENTATION option.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Joe Madden & Joseph Henry present Putting Power into the Hands of the Programmer with SAS Viya Workbench on Wednesday Nov 6.
Register now at https://www.basug.org/events.
superbug
Quartz | Level 8

@Quentin Thanks for your comments.

The desired format was produced by another software. I need to replicate the results using SAS.

Quentin
Super User

You might need to consider writing the PDF from SAS, with the desired table in landscape, and then using a PDF editor to rotate the page. Adobe has a free web tool: https://www.adobe.com/acrobat/online/rotate-pdf.html

 

Hopefully someone else will know a good SAS-only solution.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Joe Madden & Joseph Henry present Putting Power into the Hands of the Programmer with SAS Viya Workbench on Wednesday Nov 6.
Register now at https://www.basug.org/events.
Tom
Super User Tom
Super User

@superbug wrote:

@Quentin Thanks for your comments.

The desired format was produced by another software. I need to replicate the results using SAS.


Why would you want to replicate a mistake?

superbug
Quartz | Level 8

@Tom It is not a mistake. Once SAS produce the desired format, it will replace the other software. 

Reeza
Super User
The format is desired when printed, Adobe just displays it for the viewer more appropriately. If the intent is to print out the report it will meet requirements. If the intent is for viewable data online then push back and have the requirement to be updated to make sense.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 8 replies
  • 1011 views
  • 6 likes
  • 4 in conversation