BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rmacarthur
Pyrite | Level 9
Hi SAS Community, Am wondering if there is a SAS procedure (PROC DOCUMENTS?) that permits an existing .PDF document to be incorporated into a PDF file generated by SAS. The SAS PDF files we use are generated using ODS, but using an additional procedure like PROC DOCUMENTS would be fine. The background is we use SAS to generate our weekly task lists and schedules, in one master PDF document generated within ODS. Would like to add in existing PDF documents into the output (reference articles, training materials, ect...). In PROC DOCUMENTS, looks like one can import a .txt file into the output, but see nothing about importing a .PDF file. Here's the PROC DOCUMENTS Example: proc document name=import(write); import textfile="your-file-path\odsglm.lst" to ^; import textfile="your-file-path\textfileExample.sas" to ^; list/ details; run; Any suggestions? Thank you ! R
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

I have SAS write a VBS program that combines the files and I execute the VBS from SAS using %SYSEXEC. But it's really Adobe doing the work under the hood. 

 

Here's how:

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

 


@rmacarthur wrote:

Hi Reeza, 

Yes, order matters. 

What we do now is generate the PDF files using SAS ODS and then use ADOBE ACROBAT to combine then with other non-SAS-.PDF files,  to create a binder.  

Am wondering if that process of combining the PDFs can be performed within SAS, rather than ACROBAT.

Thanks, 

R

 


 

View solution in original post

8 REPLIES 8
Reeza
Super User
Are the remaining materials being added in any particular order? I generate my pages independently and then use a different process to append all the pages together at once - using SAS and Adobe Pro.
rmacarthur
Pyrite | Level 9

Hi Reeza, 

Yes, order matters. 

What we do now is generate the PDF files using SAS ODS and then use ADOBE ACROBAT to combine then with other non-SAS-.PDF files,  to create a binder.  

Am wondering if that process of combining the PDFs can be performed within SAS, rather than ACROBAT.

Thanks, 

R

 

Reeza
Super User

I have SAS write a VBS program that combines the files and I execute the VBS from SAS using %SYSEXEC. But it's really Adobe doing the work under the hood. 

 

Here's how:

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

 


@rmacarthur wrote:

Hi Reeza, 

Yes, order matters. 

What we do now is generate the PDF files using SAS ODS and then use ADOBE ACROBAT to combine then with other non-SAS-.PDF files,  to create a binder.  

Am wondering if that process of combining the PDFs can be performed within SAS, rather than ACROBAT.

Thanks, 

R

 


 

rmacarthur
Pyrite | Level 9

Super thanks , will give it a try !

Reeza
Super User
You marked your own question as the answer? I don't really need the points, but that defeats the purpose of marking the solution.
rmacarthur
Pyrite | Level 9
I know , was a mistake , my apologies , I clicked on what looked like to be part of your reply , then was shocked to see what came up as the accepted answer . I tried to fix it in settings but didn’t see any option . Am happy to undo , if at all possible .
Reeza
Super User
Not too concerned, thanks for trying though 🙂
rmacarthur
Pyrite | Level 9
Uggh , they just sent me some kind of badge too. There needs to be a REDO button !

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 2031 views
  • 5 likes
  • 2 in conversation