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.

BASUG is hosting free webinars Next up: Mike Raithel presenting on validating data files on Wednesday July 17. Register now at the Boston Area SAS Users Group event page: 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.

BASUG is hosting free webinars Next up: Mike Raithel presenting on validating data files on Wednesday July 17. Register now at the Boston Area SAS Users Group event page: 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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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