Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 8d9a0e8d authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

WORKAROUND: exception when deleting temp-files because files are not closed

closing pdfReader within the loop does not produce an output pdf ;-(
parent 86ea9057
No related branches found
No related tags found
No related merge requests found
......@@ -1687,7 +1687,7 @@ Public Class cReport
' close the pdf
pdfStamper.Close()
pdfReader.Close()
Next
'Merge files
......@@ -1703,12 +1703,14 @@ Public Class cReport
doc.Add(iTextSharp.text.Image.GetInstance(pdfpage))
Next
doc.Close()
If (doc.IsOpen()) Then
doc.Close()
End If
'Delete temp files
For Each temppath In temppdfs
File.Delete(temppath)
Next
'For Each temppath In temppdfs
' File.Delete(temppath)
'Next
Catch ex As Exception
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment