For some reason the last PDF file to be written to the "final document" is the only PDF File that is visible when the "final document" is open. However, all of the bytes are accounted for in the file size...so for example: file1 = 60 bytes and file2 = 49 bytes. The final document has 109 bytes but only contains file2 when viewed in the pdf viewer. Any ideas? What am I doing wrong?
Public Sub getPDFsAndMerge()
Dim myFinalDocumentPath As String = "C:\Temp\myFinalMergedPDFFile.pdf"
Dim myFirstDocumentPath As String = "C:\Temp\fileOne.pdf"
Dim mySecondDocumentPath As String = "C:\Temp\FileTwo.pdf"
Dim fsFinalStream As New FileStream(myFinalDocumentPath, FileMode.Append, FileAccess.Write)
Dim fsFirstStream As New FileStream(myFirstDocumentPath, FileMode.Open, FileAccess.Read)
Dim fsSecondStream As New FileStream(mySecondDocumentPath, FileMode.Open, FileAccess.Read)
Dim count As Integer = 1024
View Complete Post