LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 23 Oct 2008 20:15:32 -0400
Reply-To:   Lou <lpogoda@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Lou <lpogoda@HOTMAIL.COM>
Organization:   Aioe.org NNTP Server
Subject:   Re: problem with pdf file
Comments:   To: sas-l@uga.edu

As far as I can see from the original post, nothing's creating a page break for ODS, PDF, or anything else to recognize. In the DATA step, when writing to the PRINT file, the page size is set by an argument on the FILE statement.

I don't have access to the original file being printed, but I mocked up the following:

data test; do n = 1 to 100; output; end; stop; run; ODS PDF FILE='...'; DATA _NULL_; set test; FILE PRINT; PUT n; RUN; ODS PDF CLOSE;

The resulting PDF just ran on - the first page showed the default title and observations 1 to 66, and the 67 - 100

When I changed the step to this:

ODS PDF FILE='...'; DATA _NULL_; set test; FILE PRINT pagesize = 50; PUT n; RUN; ODS PDF CLOSE;

the PDF went for three pages, 50 lines per page (counting the default title "The SAS System") for the first two pages and the 4 line spill over on the third. Parsing the input file to insert page breaks is unnecessary.

Nothing new below, included for reference only.

"Ya Huang" <ya.huang@AMYLIN.COM> wrote in message news:200810231831.m9NAkqW0015954@malibu.cc.uga.edu... > It seems to me that the only way to ask ODS to break a page > is to send the page break command (put _page_) from within ODS. Since your > lst file was created outside the ODS, and you never used "put _page_" > in the data _null_ step, ODS won't know where to break the page. > To fix this, we have to add 'put _page_' at the proper place, which means > we need to parse the input file and find out the page break, then > use put _page_ at that point: > > > options ps=41 date number; > > title "old title"; > data _null_; > file "c:\temp\junk.lst" print; > do i=1 to 220; > put "XXXXXXXXXXX " i "XXXXXXXXX"; > end; > run; > > ODS PDF FILE='c:\temp\junk.pdf'; > options nodate nonumber; > title; > footnote; > > DATA _NULL_; > INFILE "c:\temp\junk.lst"; > FILE PRINT; > input; > if substr(_infile_,1,1)='0C'x and _n_ > 1 then do; > put _page_; > _infile_=substr(_infile_,2); > put _infile_; > end; > else put _infile_; > RUN; > > ODS PDF CLOSE; > > > On Thu, 23 Oct 2008 12:52:06 -0400, Ran S <raan67@YAHOO.COM> wrote: > > >Hi Ya Huang, > > > >Both the files (.lst and .pdf) are created in SAS windows. Yeah you might > >be right..its not recognizing the page break using ODS. Is there any way we > >can fix this problem may be specifying page break in ODS?


Back to: Top of message | Previous page | Main SAS-L page