We have alphanumeric and image data stored in a SQL Server database.
A ComponentOne Print module prints the data to a Microsoft supplied Adobe PDF driver which generates the PDF files.
Reports which contain separate alphanumeric and image data are converted to two PDF files which are then merged with PDF Combine.
The alphanumeric and combined alphanumeric/image files and then optionally combined into a single PDF file.
PDF Combine correctly combines all the files which are added using a *.pdf mask. It also correctly combines the alphanumeric files with the -List option.
The -List option fails if there is one or more previously combined alphanumeric/image files. The resultant merged file is 800-888 bytes in size and Adobe shows it as a blank page. There are no error messages.
The file names and the names in List.txt are identical and contain no blanks or unusual characters. Adobe correctly displays the merged alphanumeric/image PDF files.
An alternative command line PDF Combine program correctly merges the same file library with an identical List file.
All PDF Combine operations use the command line version.
It is executed using either of the following code segments.
Try
Dim procID As Integer
Dim newProc As Diagnostics.Process
newProc = Diagnostics.Process.Start(strtext)
newProc = Diagnostics.Process.Start("PDFCombine.exe", strtext)
procID = newProc.Id
newProc.WaitForExit()
Dim procEC As Integer = -1
If newProc.HasExited Then
procEC = newProc.ExitCode
End If
If procEC > 0 Then
MsgBox("Process with ID " & CStr(procID) & _
" terminated with exit code " & CStr(procEC))
End If
Catch err As Exception
MessageBox.Show(err.Message, "Error: EMail Load PDFCombine", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
Exit Sub
End Try
OR
Dim timeOut As Integer = 10000
Dim proc As New System.Diagnostics.Process()
Try
proc = Process.Start("PDFCombine.exe", strtext)
Catch err As Exception
MessageBox.Show(Err.Message, "Error: EMail Load PDFCombine", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
Exit Sub
End Try
Try
proc.WaitForInputIdle()
'Wait for the process to exit.
proc.WaitForExit(timeOut)
'HasExited is true if the application closed before the time-out.
If proc.HasExited = False Then
'Process is still running.
'Test to see if process is hung up.
If proc.Responding Then
'Process was responding; close the main window.
proc.CloseMainWindow()
Else
'Process was not responding; force the process to close.
proc.Kill()
End If
MessageBox.Show("PDFCombine Not Responding. Exiting EMail Program"
Me.Close()
End If
Catch err As Exception
MessageBox.Show(err.Message, "Error: EMail Load PDFCombine", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
Exit Sub
End Try
The development environment is Microsoft Visual Studio 2010, Visual Basic.
The OS is Windows Server 2008 R2. This is a 64 bit OS; however, the application program is compiled as a 32bit executable.
It is a real puzzle as to why the PDF files are correctly merged with the wild card option, but not with the -List option.
As noted, an alternate combine program functions properly with identical List file entries and identical PDF and file name data, including the alphanumeric/image files that have been generated by PDF Combine.
Thank you very much for your assistance.
Robert Robinson