Two PDF files combining or appending to one PDF file

Reply
Contributor
Posts: 22

Two PDF files combining or appending to one PDF file

Hi,

I have created PDF report with using ODS and another PDF file for Report Glossary PDF file which is saved in shared drive.

Trying to make one pdf file with two sections of report.

This is what I used 35375 - How to append to a PDF file created by ODS

ODS listing close;

ODS PDF file="Final_report.pdf";

ODS PDF(a) file="a.pdf";  <-----------Report

ODS pdf(a) close;

ODS pdf(b) file="b.pdf"; <---------------Glossary

ODS pdf(b) close;

But final result is two separate PDF files, not one. Please correct me where I am doing wrong.

Thanks.

Super User
Posts: 11,134

Re: Two PDF files combining or appending to one PDF file

You need one more

ODS PDF Close; to close the first ODS PDF destination.

This will generate 3 files, the Final_report, A and B.

Contributor
Posts: 22

Re: Two PDF files combining or appending to one PDF file

options orientation=portrait;

ods listing close;

ods PDF file="Las Vegas Summary.pdf" startpage= never;

ods PDF(a) file="a.pdf";

ods layout start;

     proc report.......

     .......   

     run;

ods layout end;

ods PDF (a) close;

ods PDF(b) file=\\lasnas01\mktg$\aaaprojects\SEO Glossary.pdf;

ods pdf(b) close;

ods PDF Close;

Here is what I have. but still getting two report files and one glossary file separately.

Super User
Posts: 19,167

Re: Two PDF files combining or appending to one PDF file

Are both files coming from SAS or is one a pre-generated PDF?

EDIT:

If one is a pre-generated PDF you can use the techniques here which I believe require an Acrobat Professional edition installed on your computer and a Windows machine.

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

Contributor
Posts: 22

Re: Two PDF files combining or appending to one PDF file

Report file is from proc report and Glossary is pre-generated from word document.

Both files have to be generated from SAS?

Super User
Posts: 19,167

Re: Two PDF files combining or appending to one PDF file

To use the technique you've linked to, yes, both have to be generated from SAS.

The method I reference doesn't, but it looks like you're on Unix so I'm not sure. There may be other unix commands that can be used.

Ask a Question
Discussion stats
  • 5 replies
  • 894 views
  • 0 likes
  • 3 in conversation