BookmarkSubscribeRSS Feed
Amine_Khemiri
Obsidian | Level 7

Hello Community,

 

I would like to combine multiple pdf files into one single pdf using SAS studio. 

 

Thanks for your help.

 

Kind regards,

Amine

2 REPLIES 2
Quentin
Super User

Hi, this isn't really a SAS thing, unfortunately.  If you have other tools/languages that can combine PDFs, you can use SAS to drive/automate the process.  If you google a bit, you'll find approaches  like:

https://communities.sas.com/t5/SAS-Programming/Combine-PDF-files-using-SAS/td-p/488455

https://www.lexjansen.com/pharmasug-cn/2016/PG/PharmaSUG-China-2016-PG21.pdf

https://gist.github.com/statgeek/264fe76bdccb6b137215

 

SAS gives you a lot of control when creating PDFs.  But doesn't really have features for managing/updating PDFs after they have been created.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
Jackson_Prok
Calcite | Level 5

@Amine_Khemiri wrote:

Hello Community,

 

I would like to combine multiple pdf files into one single pdf using SAS studio. 

 

Thanks for your help.

 

Kind regards,

Amine


Amine, you can merge PDF files using SAS Studio by leveraging the `FILENAME` statement and the `DATA` step along with `ods pdf`. Here's a simple example:

FILENAME outpdf 'combined.pdf';

DATA _NULL_;
FILE outpdf;
ods pdf (id=merge) file=outpdf;
/* insert code to generate or import PDF files here */
ods pdf close;
RUN;

Remember to replace the placeholder comment with the code and an whatsapp +2 that imports or generates the PDF files you want to combine.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 901 views
  • 0 likes
  • 3 in conversation