Concatenate Two PDF Files in VB.NET?

Posted on 2008-11-18
Last Modified: 2012-05-05
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?
Question by:gcz
    LVL 4

    Expert Comment

    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
    LVL 1

    Accepted Solution

    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.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now