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

Hello, I would like to combine two PDF files (which are already stored externally) into one file by using SAS. I've seen a paper on how to achieve this with Proc Groovy, but the paper does not give all the instructions.

 

Thank you for your help!

 

Many thanks,

 

Kriss Harris

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would call command line PDF combine:

https://forums.adobe.com/thread/1524493

 

Or the very useful PDFtk:

https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

 

Its not a SAS thing to combine PDFs.  I would imagine groovy is calling some Java library to combine PDFs.

View solution in original post

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would call command line PDF combine:

https://forums.adobe.com/thread/1524493

 

Or the very useful PDFtk:

https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

 

Its not a SAS thing to combine PDFs.  I would imagine groovy is calling some Java library to combine PDFs.

djrisks
Barite | Level 11

Thank you for this RW9. The PDFtk works well. I wanted to do it via the command line, but I didn't know much about the ADOBE SDK and how to do it that way. Have you done it that way before please?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Never used Adobe SDK, will look one day.  PDFtk is really useful, I use it for extracting bookmark information and updating that.

djrisks
Barite | Level 11
Okay, thank you for confirming.
Jagadishkatam
Amethyst | Level 16

Hi Kriss Harris,

 

could you please try the below code, hope it will work.

 

ods pdf file=’~path\final.pdf’;

ods pdf(a) file="~path\a.pdf";
ods pdf(a) close;

ods pdf(b) file="~path\b.pdf";
ods pdf(b) close;

ods pdf close;
Thanks,
Jag
djrisks
Barite | Level 11

Hi Jag,


Thank you for this. My PDF files have already been created, so unfortunately I cannot use this method. 

 

Many thanks,

 

Kriss

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 5718 views
  • 1 like
  • 3 in conversation