Discussion:
Merging PDF files
(too old to reply)
William Kossack
2005-01-04 22:24:53 UTC
Permalink
I've made a bunch of progress in the past couple weeks but......

Now they tell me they want various of the pdf files merged together.

I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.

Any ideas?
Howard Schreier <hs AT dc-sug DOT org>
2005-01-05 03:38:51 UTC
Permalink
A shell command will not be able to concatenate PDF files any more than one
can concatenate SAS datasets. You would need Acrobat, or a workalike.
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Darren Mayne
2005-01-05 06:38:36 UTC
Permalink
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William

You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
code should be (substitute your fully qualified file path for <path>):

X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";

Cheers
Darren

--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
***@iahs.nsw.gov.au
William Kossack
2005-01-05 16:13:57 UTC
Permalink
cool it worked

the only kicker is if the gs executable is not in your path you need to
provide it
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
William Kossack
2005-01-05 16:18:07 UTC
Permalink
is it possible to insert an rtf file into a pdf using gostscript?
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
William Kossack
2005-01-05 21:32:46 UTC
Permalink
does this actuall add the two together or create a link

I created a pdf from 3 files but when I sent it to my boss the content
of one of the files does not seem to show up
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
Jack Hamilton
2005-01-05 21:45:26 UTC
Permalink
If you're familiar with VB/VBA or Microsoft Script, and you have Acrobat
Professional, you probably could use the program interface to merge the
files. I haven't tried it myself, but I did check that there's an
Insert File method. There might be some examples on the Adobe web
page.

I suppose I should learn the microsoft scripting language someday.





--
***@FirstHealth.com
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA

Coelum, non animum mutant, qui trans mare currunt.
does this actuall add the two together or create a link

I created a pdf from 3 files but when I sent it to my boss the content
of one of the files does not seem to show up
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of
joining
Post by Darren Mayne
Post by William Kossack
the pdf files outside of SAS ie using X and passing a shell command
to
Post by Darren Mayne
Post by William Kossack
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X
command
Post by Darren Mayne
code should be (substitute your fully qualified file path for
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
"MMS <firsthealth.com>" made the following annotations.
------------------------------------------------------------------------------
This message, including any attachments, is intended solely for the use
of the named recipient(s) and may contain confidential and/or
privileged information. Any unauthorized review, use, disclosure or
distribution of this communication(s) is expressly prohibited.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy any and all copies of the original message.
Thank you.
==============================================================================
Darren Mayne
2005-01-05 23:23:06 UTC
Permalink
Yes, this method concatenates the files - check that all your source file
paths are correct. If you can output your RTF file to PostScript (PS) then
you can just include the PS file in the X command syntax I provided
previously. If not, there is probably a GhostScript process to write the
RTF to PS first, but you will need to look into this yourself.

Cheers
Darren

--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
Post by William Kossack
does this actuall add the two together or create a link
I created a pdf from 3 files but when I sent it to my boss the content
of one of the files does not seem to show up
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
William Kossack
2005-01-05 23:49:48 UTC
Permalink
It is very curious

I sent the pdf to two people

one can see all the included file contents

the other only sees a couple words of one of the files
Post by Darren Mayne
Yes, this method concatenates the files - check that all your source file
paths are correct. If you can output your RTF file to PostScript (PS) then
you can just include the PS file in the X command syntax I provided
previously. If not, there is probably a GhostScript process to write the
RTF to PS first, but you will need to look into this yourself.
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
Post by William Kossack
does this actuall add the two together or create a link
I created a pdf from 3 files but when I sent it to my boss the content
of one of the files does not seem to show up
Post by Darren Mayne
Post by William Kossack
I've made a bunch of progress in the past couple weeks but......
Now they tell me they want various of the pdf files merged together.
I could either rewrite a large amount of code or find a way of joining
the pdf files outside of SAS ie using X and passing a shell command to
append one pdf to another.
Any ideas?
Hi William
You could concatenate the files using GhostScript (opensource from
www.ghostscript.com) in the manner you have suggested above. The X command
X "<path>\gswin32c.exe -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -
sOutputFile=<path>\test2.pdf <path>\file01.pdf <path>\file02.pdf";
Cheers
Darren
--------
Darren Mayne
Epidemiologist
Sydney South Coast Health
s***@gmail.com
2019-01-24 06:14:56 UTC
Permalink
One more PDF merging utility, for Merge PDF Tool project They have a sample that demonstrates how you can merge two PDF files using that library visit more:- https://www.softwarewiki.org/merge-pdf/
Loading...