Hi Paddy,
Thanks for your inquiry.
Is the text file PDFString? I used below code to convert the text to a PDF file, but the result PDF is damaged. I have attached it.
- Code: Select all
Dim PDFString As String = File.ReadAllText("Test.txt")
Dim MS As New MemoryStream(Encoding.UTF8.GetBytes(PDFString))
File.WriteAllBytes("20801.pdf", MS.ToArray())
As for your issue, could you please firstly check if your PDF stream is correct? Could you please provide your input PDF file for our direct testing?
Besides, I noticed you merged files, could you please also provide all files so that we could check if the merged process causes the issue?
Sincerely,
Betsy
E-iceblue support team
Login to view the files attached to this post.