BookmarkSubscribeRSS Feed
ask100q
Calcite | Level 5

Is it possible to combine several PDF files into a single document in SAS? 

Here's our workflow:

1. Data in SAS

2. Graphic templates set up in Excel

3. Use DDE to create graphic products and output to PDF through Excel

Now, we need to combine all of those SAS-DDE-Excel produced PDFs into a single document using SAS.  I know it's possible to direct multiple products into a single PDF using ODS PDF FILE=, but we're creating PDFs through Excel, not SAS (and unfortunately can't change the workflow...).

Please advise.  Thanks.

5 REPLIES 5
Cynthia_sas
SAS Super FREQ

Hi:

  I believe you have to use an Adobe product or a third-party PDF creation package to combine multiple PDF files (however they were created) into 1 PDF file. SAS cannot do it. Normally, you put multiple SAS outputs into 1 PDF file by doing something like this:

ods pdf file='makeone.pdf';

** proc print code;

** sas/graph code;

** some other proc code;

** Maybe some other sas/graph code;

ods pdf close;

In the above job, all 4 procedure outputs will go into 1 PDF file. You might try to replicate your Excel graphs using SAS/GRAPH or the SG procedures -- in which case, you could alter your process to do everything in SAS instead of SAS, DDE and Excel.

Otherwise, if you do not want to go down the SAS/GRAPH road, you may want to investigate third-party applications that can combine multiple PDFs into 1 PDF file or investigate Adobe products, such as Adobe Acrobat.

cynthia

arronlee
Calcite | Level 5

Hi, I am not using Adobe's products to create PDF files. I am using another PDF creation tool instead of Adobe to create multi pages PDFs. You can also google it and select a PDF processor whose way of processing is simple and fast to help you with the related work. It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.

Best regards,

Arron

pittypan
Calcite | Level 5

It is not currently possible to append to a PDF file that was created by ODS from within SAS®. However, this sample illustrates two methods that enable you to combine multiple tables in a PDF file using SAS. Hope it can help you combine multiple pdf files.

view more at:35375 - How to append to a PDF file created by ODS

Dreamer
Obsidian | Level 7

I know its a old post but here is my solution:

You can use VBA macros to refresh data and then format it. #simple

Also it depends what kind of format you need. A lot can achieved via Proc Report.

statistician13
Quartz | Level 8

I'd recommend giving this article a read.  It should be able to do pretty much what you'd like to do with a few modifications:

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

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!

Discussion stats
  • 5 replies
  • 7584 views
  • 1 like
  • 6 in conversation