Hi,
I am converting a PDF file to a png and it works fine except for this file. I am guessing it has something to do with the layers. Looks like the top layer that says "For Information Only" is not transparent and is covering the rest of the document.
Original PDF: dropbox.com/s/y3jb1mmiazwyxrx/PQP%20Gap_Analysis%201_0.pdf?dl=0
Result PNG: dropbox.com/s/bc8ehls4z9kcr8c/PQP%20Gap_Analysis%201_0.png?dl=0
(Its not letting me post URLs?)
Here is the code I am using:
Protected Friend Function ConvertToImage(ByVal strPDF As String) As String
Dim strFileName As String = oGlobals.strApplicationPath + "Preview\" + oGlobals.strUsername + "\" + strPDF.Replace(".pdf", ".png")
Dim oPDF As New Spire.Pdf.PdfDocument()
oPDF.LoadFromFile(oGlobals.strDocuments + strPDF)
Using oimage As System.Drawing.Image = oPDF.SaveAsImage(0, 24, 24)
oimage.Save(strFileName, System.Drawing.Imaging.ImageFormat.Png)
End Using
oPDF.Close()
Return strFileName
End Function
Thanks,
Andrew