Desktop productivity for business analysts and programmers

PDF report in landscape format

Reply
N/A
Posts: 0

PDF report in landscape format

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?
Occasional Contributor
Posts: 6

Re: PDF report in landscape format

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;
SAS Super FREQ
Posts: 8,820

Re: PDF report in landscape format

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
SAS Super FREQ
Posts: 8,820

Re: PDF report in landscape format

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
N/A
Posts: 0

Re: PDF report in landscape format

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
SAS Super FREQ
Posts: 8,820

Re: PDF report in landscape format

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
Ask a Question
Discussion stats
  • 5 replies
  • 2494 views
  • 0 likes
  • 3 in conversation