BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
learner_sas
Quartz | Level 8

Hello Everybody,

 

I am using Below SAS code to combine my PDF files . I am using EG 7.1 

/* Method 1 */

/* Turn off the Output window */
ods listing close;

/* Open two ODS PDF instances, one creating COMBINED_1.PDF, and the other creating A.PDF */
ods pdf file="combined_1.pdf";
ods pdf(a) file="a.pdf";

proc report nowd data=sashelp.class(obs=10);
   title "In COMBINED.pdf and A.pdf";
run;

/* Close A.PDF, but COMBINED.PDF remains open */
ods pdf(a) close;

ods pdf(b) file="b.pdf";

proc report nowd data=sashelp.vtable(obs=20);
   title "In COMBINED.pdf and B.pdf";
   column libname memname nobs nvar crdate;
run;

ods pdf(b) close;

ods pdf(c) file="c.pdf" ;

proc report nowd data=sashelp.class;
   title "In COMBINED.pdf and C.pdf";
run;

ods pdf(c) close;
ods pdf close;

 

which is from 

http://support.sas.com/kb/35/375.html

 

I am able to append the pdf files with the no problem but TOC(Table of contents) looks different then what it was for individual PDF. I am wondering what am I missing here.

 

 

 

 

 

 


No Proper TOC.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The SAS TOC generator only understands one document. If you want all of the elements in the TOC generated by SAS then you they all go within a single Ods PDF / ODS PDF Close sandwich.

If you also want separate documents either look into proc document to redirect already created output to additional documents or run that separately.

View solution in original post

1 REPLY 1
ballardw
Super User

The SAS TOC generator only understands one document. If you want all of the elements in the TOC generated by SAS then you they all go within a single Ods PDF / ODS PDF Close sandwich.

If you also want separate documents either look into proc document to redirect already created output to additional documents or run that separately.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 969 views
  • 0 likes
  • 2 in conversation