Merge two or more pdf documents into one
Merge two or more pdf documents into one
(OP)
Hello All,
I have a web page where users can select multiple check boxes (where each checkbox is a pdf document link) and i want to be able to merge the selected document into so that i can print multiple copies collately. I would really appreciate it if someone can provide with the sample code or maybe guide me in the right direction.
thanks,
I have a web page where users can select multiple check boxes (where each checkbox is a pdf document link) and i want to be able to merge the selected document into so that i can print multiple copies collately. I would really appreciate it if someone can provide with the sample code or maybe guide me in the right direction.
thanks,
RE: Merge two or more pdf documents into one
[1] open one pdf file
[2] with adobe select document\insert pages
[3] open the 2nd file
[4] save the current file into a new pdf file
hope this helps
RE: Merge two or more pdf documents into one
thanks for your feedback but i was looking more in terms of merging the two pdf documents using ASP or VB. I am trying to write a program that will merge two documents that are on the web server and then print them.
Let me know if you have any suggestions for this,
thanks,
RE: Merge two or more pdf documents into one
Do you happen to know the ASP code (vbscript) to put a PDF document link on a web page? I would appreciate it your reply. Thank you.
RE: Merge two or more pdf documents into one
RE: Merge two or more pdf documents into one
I have been looking for a solution that would also allow me to insert pages programmatically. I find that Adobe allows you do specify a folder of Pdf documents and then it will merge these for you; however the order gets all jumbled up. Our needs require that these documents are inserted in the order that we specify. I have found some useful information in those documents. In the meantime, if you know of anything that might be helpful for us, please let me know.
Thanks,
GM
RE: Merge two or more pdf documents into one
RE: Merge two or more pdf documents into one
If you're still interested...
I was asked to combine two or more PDF files myself recently (prior to E-mailing the resulting PDF).
had to do this quickly (deadline) but it works.
cFiles is just a collection of filenames in the order I want the PDF files to be combined.
You'll have to set a references to the Acrobat Type library but you might already know that.
Private Sub Combine(ByVal cFiles As Collection)
Dim i As Long
Dim oPDF As Acrobat.CAcroPDDoc
Dim oTemp As Acrobat.CAcroPDDoc
Dim sDir As String
Dim nPagesTo As Long
Dim nPagesFrom As Long
On Error GoTo ERRHANDLER
sDir = File1.Path
If Right$(sDir, 1) <> "\" Then sDir = sDir & "\"
Set oPDF = CreateObject("AcroExch.PDDoc")
If Not oPDF.Open(sDir & cFiles(1)) Then
Err.Raise vbObjectError + 1001, "Combine", "Unable to open " & cFiles(1)
End If
nPagesTo = oPDF.GetNumPages
For i = 2 To cFiles.Count
Set oTemp = CreateObject("AcroExch.PDDoc")
If Not oTemp.Open(sDir & cFiles(i)) Then
Err.Raise vbObjectError + 1001, "Combine", "Unable to open " & cFiles(i)
End If
nPagesFrom = oTemp.GetNumPages
If Not oPDF.InsertPages(nPagesTo - 1, oTemp, 0, nPagesFrom, True) Then
Err.Raise vbObjectError + 1001, "Combine", "Unable to add " & cFiles(i)
End If
nPagesTo = oPDF.GetNumPages
Next i
If Not oPDF.Save(PDSaveFull, sDir & Text1.Text) Then
Err.Raise vbObjectError + 1001, "Combine", "Unable to save " & Text1.Text
End If
Set oPDF = Nothing
Exit Sub
ERRHANDLER:
MsgBox Err.Description & vbCrLf & _
Err.Source, vbExclamation
Set oPDF = Nothing
Set oTemp = Nothing
End Sub
RE: Merge two or more pdf documents into one
RE: Merge two or more pdf documents into one
Is this possible in ASP? Is the full version of Acrobat need to be installed on the web server or is there more that has to be installed for this to work?
Thnaks.