• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1114
  • Last Modified:

Concatenate Two PDF Files in VB.NET?

Hi Experts,

Not sure if this is possible, but here goes - I need to be able to join two PDF files together programatically. Operating system is XP, so I am looking to maybe create a command line app using VB.NET and pass in the two filenames as switches. This app I then need to call from a script.

Is this possible using VB.NET? I am open to suggestions, but I do need this to be done via program control, with no UI. I have googled this but I'm not getting very far.

Any ideas?
1 Solution
I dont kow whether you are ready to user 3rd pary controls. If yes then here is one example of it with code.
iText is a library that allows you to generate PDF files on the fly and its free
gczAuthor Commented:
Thanks for the post.

I have done some further digging around and found a utility called pdftk, which is basically what I was hoping to end up with myself. It is a command line utility which can append pdfs among other things, and is going to be lot quicker than coding something myself:


Pass in the filenames, and the output filename and it does it for you, example:

'pdftk.exe pdf1.pdf pdf2.pdf cat output output.pdf'

This appends pdf1.pdf and pdf2.pdf and outputs them as output.pdf.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now