- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I'm trying to make a report in ODS PDF with a lot of images where I want to set the PAPERSIZE to best fit the image. I've done this before in ODS EXCEL, but can't seem to make it work in ODS PDF. I get stuck when trying to do an ODS LAYOUT in the new PAPERSIZE and it won't work because the height is taller than the first page's PAGESIZE. Here's what I'm trying:
title;
option papersize = (14in 13in) orientation=landscape leftmargin=0.1in rightmargin=0.1in;
ods pdf file='early_onset_figures.pdf' notoc bookmarkgen=no;
**First graph code here;
option papersize = (9in 14in);
ods pdf;
title 'Figure 3';
ods layout start rows=2 width=7in height=13in;
ods region;
**plot stuff here;
ods region;
**more plot stuff here;
ods layout close;
ods pdf close;
I tried changing the PAPERSIZE option prior to doing another ODS PDF statement and again without the ODS PDF statement with the same results. I get a warning when I try to do the ODS LAYOUT statement that "WARNING: HEIGHT exceeds available space for PDF destination. This option will be ignored." If I have the second PAPERSIZE option and I try changing the height to be anything and still get this warning for some reason. If I set my PAPERSIZE to the second figure and don't try to change it I don't get this warning. Is this possible to change or does the PAPERSIZE when ODS PDF starts set for the rest of the document?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think the option statement can only be used while ods pdf is closed.
Using the following code on SAS EG produces two PDF documents which can then be combined:
title;
option papersize = (14in 13in) orientation=landscape leftmargin=0.1in rightmargin=0.1in;
ods pdf file="C:\My SAS\_examples_/early_onset_figures.pdf" notoc bookmarkgen=no;
**First graph code here;
title 'Figure 1';
ods layout start rows=2 width=7in height=12in;
ods region;
**plot stuff here;
ods region;
**more plot stuff here;
ods layout end ;
ods pdf close;
option papersize = (9in 14in);
ods pdf file="C:\My SAS\_examples_/early_onset_fig2.pdf";
title 'Figure 2';
ods layout start rows=2 width=7in height=13in;
ods region;
**plot stuff here;
ods region;
**more plot stuff here;
ods layout end ;
ods pdf close;
By the way, the layout wrapper is "start" and "end" (not "close").
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation