Solved

append pdf file

Posted on 2013-06-18
2
347 Views
Last Modified: 2013-07-11
I am trying to use  Itextsharp http://itextpdf.com/ to append a pdf file to existing file. It works fine. How can I insert the file that I want to append to a specific page.

Sample

Existing pdf  has 5 pages. I want to append a file to page 3.

Public Sub AppendPDFexisting(ByVal sourceFile As String, ByVal filetoAppend As String, ByVal nuFile As String)
        Dim OriginalDoc As New Doc
        OriginalDoc.Read(sourceFile)
        Dim AppendingPDF As New Doc
        AppendingPDF.Read(filetoAppend)
        OriginalDoc.Append(AppendingPDF)
        AppendingPDF.Dispose()
        OriginalDoc.Save(nuFile)
        OriginalDoc.Dispose()
 
    End Sub
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 500 total points
ID: 39260293
Hi,

I think you may have to extract the existing PDF and recreate with the order you wish to have! I mean you may have to append the file where you need etc.,

http://stackoverflow.com/questions/6657899/insert-page-into-existing-pdf-using-itextsharp

Hope it helps u...
0
 
LVL 13

Expert Comment

by:jonnidip
ID: 39264532
Please give a try to PsdSharp.
I have worked with it and I think it is better than iTextSharp (from which derives). It is easier to use and it implements the disposing of objects.
You may find a sample of how to combine 2 documents here.

Regards.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

695 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