- Home
- Forum
- ASP.NET Web Forms (Classic)
- PDF content is not visible
PDF content is not visible
Hello,
Syncfusion version:8.3.0.21
I have a pdf (file1.pdf) that is produced by altsoft because is the result of conversion from a word 2003 xml file to pdf.
That is why I need another sofware, because Syncfusion does not support conversion from word 2003 xml to pdf.
I attach 3 files as example:
Hello.xml (word 2003 file), File1.pdf (Hello.xml converted into PDF by altsoft), File2.pdf (simple pdf file) and the result of merge Result.pdf.
I take File1.pdf that has 1 page with a simple text "Hello world!" and I need to merge it with another pdf file (File2.pdf) that has 2 pages.
This second file is NOT produced by altsoft.
The problem is that after merge I get a PDF file of 3 pages, page 1 and page 2 are visible and correct (because they come from File2) but page 3 does not show its content even if the string "Hello World !" is there (if you make a search in the page it founds the text correctly).
It seems font issue but I cannot find a solution or the reason why the text is not visible.
Notice that if you simply open File1.pdf content is visible.
But when you load into a Syncfusion PDFDocument or merge it, content is no more visible.
Thanks for any help!
Here is my code for merging:
Private Sub MergePDF()
Dim ResultPDFPath As String ="c:\temp\File1.pdf" ' PDF produced by altsoft (converting word 2003 ML)
Dim PDFsample As String ="c:\temp\File2.pdf" 'simple pdf used for example
Try
'create a stream object for each file
'PDFsample
Dim fs As New FileStream(PDFsample, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim bytes(fs.Length - 1) As Byte
fs.Read(bytes, 0, bytes.Length)
fs.Close()
Dim SampleStream As New MemoryStream(bytes)
'ResultPDFPath
fs = New FileStream(ResultPDFPath, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim pdfbytes(fs.Length - 1) As Byte
fs.Read(pdfbytes, 0, pdfbytes.Length)
fs.Close()
Dim PDFStream As New MemoryStream(pdfbytes)
'create an array and load stream objects
Dim streamArray(1) as System.IO.Stream
streamArray.setValue(SampleStream, 0)
streamArray.setValue(PDFStream,1)
'create pdf document
Dim PDFFile As New Syncfusion.Pdf.PdfDocument()
Dim i As Integer
For i = 0 To streamArray.Length - 1
Dim str As New MemoryStream
str = streamArray(i)
str.Seek(0, SeekOrigin.Begin)
'create a PdfLoadedDocument from stream
Dim LDoc As New Syncfusion.Pdf.Parsing.PdfLoadedDocument(str)
'append to pdf document
PDFFile.Append(LDoc)
Next
'save file
PDFFile.Save("c:\temp\Result.pdf")
Catch ex As Exception
'....
End Try
End Sub
Files_2c44c123.zip
Syncfusion version:8.3.0.21
I have a pdf (file1.pdf) that is produced by altsoft because is the result of conversion from a word 2003 xml file to pdf.
That is why I need another sofware, because Syncfusion does not support conversion from word 2003 xml to pdf.
I attach 3 files as example:
Hello.xml (word 2003 file), File1.pdf (Hello.xml converted into PDF by altsoft), File2.pdf (simple pdf file) and the result of merge Result.pdf.
I take File1.pdf that has 1 page with a simple text "Hello world!" and I need to merge it with another pdf file (File2.pdf) that has 2 pages.
This second file is NOT produced by altsoft.
The problem is that after merge I get a PDF file of 3 pages, page 1 and page 2 are visible and correct (because they come from File2) but page 3 does not show its content even if the string "Hello World !" is there (if you make a search in the page it founds the text correctly).
It seems font issue but I cannot find a solution or the reason why the text is not visible.
Notice that if you simply open File1.pdf content is visible.
But when you load into a Syncfusion PDFDocument or merge it, content is no more visible.
Thanks for any help!
Here is my code for merging:
Private Sub MergePDF()
Dim ResultPDFPath As String ="c:\temp\File1.pdf" ' PDF produced by altsoft (converting word 2003 ML)
Dim PDFsample As String ="c:\temp\File2.pdf" 'simple pdf used for example
Try
'create a stream object for each file
'PDFsample
Dim fs As New FileStream(PDFsample, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim bytes(fs.Length - 1) As Byte
fs.Read(bytes, 0, bytes.Length)
fs.Close()
Dim SampleStream As New MemoryStream(bytes)
'ResultPDFPath
fs = New FileStream(ResultPDFPath, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim pdfbytes(fs.Length - 1) As Byte
fs.Read(pdfbytes, 0, pdfbytes.Length)
fs.Close()
Dim PDFStream As New MemoryStream(pdfbytes)
'create an array and load stream objects
Dim streamArray(1) as System.IO.Stream
streamArray.setValue(SampleStream, 0)
streamArray.setValue(PDFStream,1)
'create pdf document
Dim PDFFile As New Syncfusion.Pdf.PdfDocument()
Dim i As Integer
For i = 0 To streamArray.Length - 1
Dim str As New MemoryStream
str = streamArray(i)
str.Seek(0, SeekOrigin.Begin)
'create a PdfLoadedDocument from stream
Dim LDoc As New Syncfusion.Pdf.Parsing.PdfLoadedDocument(str)
'append to pdf document
PDFFile.Append(LDoc)
Next
'save file
PDFFile.Save("c:\temp\Result.pdf")
Catch ex As Exception
'....
End Try
End Sub
Files_2c44c123.zip
SIGN IN To post a reply.
3 Replies
SP
Selvakumar P
Syncfusion Team
January 25, 2011 10:13 AM UTC
Hi Silvia,
Thank you for using Syncfusion Products.
We are able to reproduce the issue while merging the given documents. It is under further investigation.
Could you please report this issue through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.
Please let us know if you have any queries.
Regards,
Selvakumar.
Thank you for using Syncfusion Products.
We are able to reproduce the issue while merging the given documents. It is under further investigation.
Could you please report this issue through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.
Please let us know if you have any queries.
Regards,
Selvakumar.
SS
Silvia Sasso
January 25, 2011 10:59 AM UTC
Ok,
I reported the issue through Direct Trac Developer Support System.
Thanks,
Silvia Sasso
I reported the issue through Direct Trac Developer Support System.
Thanks,
Silvia Sasso
SP
Selvakumar P
Syncfusion Team
January 26, 2011 04:33 AM UTC
Hi Silvia,
Thanks for the update.
Regards,
Selvakumar.
Thanks for the update.
Regards,
Selvakumar.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
SS Silvia Sasso
- Jan 24, 2011 03:32 PM UTC
- Jan 26, 2011 04:33 AM UTC