?
Solved

append pdf file

Posted on 2013-06-18
2
Medium Priority
?
352 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

801 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