The SAS Output Delivery System and reporting techniques

Change page size mid report with ods pdf

Reply
Contributor
Posts: 36

Change page size mid report with ods pdf

Hi,

I have a two page report that I'm making. The first page is just two tables so a 8.5 X 11 page size is good. However the second page has two columns of five graphs and it fits well on a 8.5 by 14 page size. I've tried:

     end of first page code

ods layout end;

ods pdf startpage=now;

ods layout start height = 14in width = 8.5in;

but it just doesn't work.

Any tips to get past this one?

Thanks,

Bruce

PROC Star
Posts: 7,363

Re: Change page size mid report with ods pdf

Did you take a look at a previous response to this question, namely https://communities.sas.com/message/19235#19235

The size has to be set first and, unless there is something I'm not aware of, you could produce the two pdf files and then combine them outside of SAS.

Contributor
Posts: 36

Re: Change page size mid report with ods pdf

The reply suggests to make two pdfs. No really a solution. As this report is a daily report, I really don't want to be adding more steps...

Thanks,

Bruce

Contributor
Posts: 36

Re: Change page size mid report with ods pdf

A little more searching found this:

http://analytics.ncsu.edu/sesug/2011/BB15.Welch.pdf

which I hard coded to :

Dim Doc1
Dim Doc2


Set Doc1 = CreateObject("AcroExch.PDDoc")
Set Doc2 = CreateObject("AcroExch.PDDoc")

file1 = Doc1.Open("C:\ods_outputs\alc_report printer.pdf")
file2 = Doc2.Open("C:\ods_outputs\_2011_12_alc_comparative.pdf")
Stack = Doc1.InsertPages(Doc1.GetNumPages - 1, Doc2, 0, Doc2.GetNumPages, 0)

SaveStack = Doc1.Save(1, "C:\ods_outputs\combined.pdf")

and it worked!

Ask a Question
Discussion stats
  • 3 replies
  • 461 views
  • 0 likes
  • 2 in conversation