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
PROC Star

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.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
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
PROC Star

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.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 258 views
  • 6 likes
  • 4 in conversation