i've a little big problem with merge pdf in a webservice compiled with framework 2.0
In the bin folder I copied the following files in the redist folder framework 2.0 of the installation package GdPicture 9.4
GdPicture.NET.9.dll,
GdPicture.NET.9.PDF.dll,
GdPicture.NET.9.filters.64.dll
GdPicture.NET.9.image.gdimgplug.64.dll
(The server is a windows 2003 64bit)
but I have a strange behavior.
on my development pc windows 7 64 bit pdf is created correctly on the server while the pdf that is generated can not open it with acrobat with the following error
"There was opening this document. The file is damaged and could not be repaired"
attached the two files the first 000_FATTURA ACCOMPAGNATORIA_25.pdf is the original while the other is the one obtained with the merge command
any ideas ?
Best regards
Marco
Code: Select all
Public Sub MergeGdiPdf(ByVal Destinazione As String, ByVal files() As String)
Dim oLicenceManager As New LicenseManager()
oLicenceManager.RegisterKEY("xxx")
'Dim oSrcPDF As New GdPicturePDF
Dim oDstPDF() As GdPicturePDF
ReDim Preserve oDstPDF(files.GetLength(0) - 1)
Dim n As Integer
For n = 0 To files.GetLength(0) - 1
oDstPDF(n) = New GdPicturePDF
oDstPDF(n).LoadFromFile(files(n), False)
Next
Dim oNewGdPicturePDF As GdPicturePDF = oDstPDF(0).MergeDocuments(oDstPDF)
Dim status As GdPictureStatus = oDstPDF(0).GetStat
If status = GdPictureStatus.OK Then
oNewGdPicturePDF.SaveToFile(Destinazione)
oNewGdPicturePDF.CloseDocument()
End If
For n = 0 To files.GetLength(0) - 1
oDstPDF(n).CloseDocument()
Next
end sub