BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is it possible to set the properties of the PDF report to landscape?
And further, how do I remove the bookmark from PDF in EG?
5 REPLIES 5
wensui
Calcite | Level 5
follow is copied from my blog.


data test;
do i = 1 to 100;
x = ranuni(i);
y = 1 + 5 * x + rannor(i);
output;
end;
run;

filename pdfout 'c:\temp\regout.pdf';
filename output catalog 'work.output.regout.source';

/* ROUTE OUTPUT TO THE SOURCE IN CATALOG */
proc printto print = output new;
run;

options nodate nonumber;
proc genmod data = test;
model y = x / dist = normal link = identity;
run;

proc printto;
run;

/* UTILIZE GRAPHIC DEVICE TO OUTPUT PDF/EPS FILES */
goptions reset = global device = pdf gsfname = pdfout gsfmode = replace
ftext = none htext = 10pt rotate = landscape;

proc gprint fileref = output;
run;
Cynthia_sas
SAS Super FREQ
One of the things that I do for basic tabular or graphic reports is this:
[pre]
options orientation=landscape;

ods pdf file='somefile.pdf' notoc;
proc print data=sashelp.shoes(obs=20);
title 'Should be Landscape';
run;
**;
** other procs here;
**;
ods pdf close;
[/pre]

If you are running in SAS 9.1.3, then you have an additional option for suppression or "hiding" the bookmark area:

[pre]
ods pdf file='somefile.pdf' bookmarkgen=no;
[/pre]

Basically, NOTOC was the option you used in SAS 8 to get rid of the bookmark area and BOOKMARKGEN=NO is how you suppress them in SAS 9 (you suppress them because you're not creating them.)

In EG, you can either submit your code from a CODE node and type the whole code. OR, you can go into EG following this click path (in EG 4.1): [pre]
Tools --> Options
Tasks --> Custom Code
Click Edit...
When the Edit Window opens, type the options statement:
Options orientation=landscape;
Click --> Save
Select Results --> PDF (still in the Options window)
Look for the Advanced section where you can type additional options for the ODS PDF statement.
In the white box, type:

BOOKMARKGEN=NO (NO SEMI-COLON here)
Select Results --> Results General (still in the Options window)
Deselect HTML and SAS Report as Result Formats
Click on the check box for PDF as Result Format
Click --> OK to close the Options Window

Now, do a TASK
Describe --> List Data
Open Data from SASHELP
Choose SHOES.SAS7BDAT file
Click --> OPEN
Select your columns to LIST
Click --> RUN
You should get a PDF file in Landscape mode WITHOUT a bookmark area.

It's up to you which way you do it.
Of course, using the Click method to change the options means that when you want HTML,
you have to go back and click HTML as a Results Format in the Options window.
But if all you're doing in generating PDF output
with EG, then either the code method or the click path method should work for you.

Good luck!
cynthia
Cynthia_sas
SAS Super FREQ
Sorry, I just completely spaced out on the existence of the Add Table of Contents check box under Results -->PDF in the EG Options. You can just deselect or uncheck that box to suppress the TOC. You do NOT need to type in BOOKMARKGEN=NO.
cynthia
deleted_user
Not applicable
Hi,

I'm having the same problem, I can only get a "portrait" .pdf file. I did add the options statement (options orientation=landscape; both "before task" and "after task") and the "insert custom SAS code" boxes are both checked but the .pdf report still comes in portrait.

Any suggestion?

Thanks,
D
Cynthia_sas
SAS Super FREQ
Hi!
I think your best bet might be to contact Tech Support, then. When I ran my test in EG, my output report displayed in landscape orientation (inside Adobe Acrobat Reader), and using SAS 9.1.3 on my local computer for execution. If there is something different about your setup, Tech Support folks are the best ones to help you figure it out.

To figure out how to contact Tech Support, refer to:
http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 9198 views
  • 0 likes
  • 3 in conversation