Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jul 29, 2016 7:50 am

My Pdf has a Graph, while converting it to image getting distortion in Graph.

I am using the below code snippet. Please respond ASAP.

Dim doc As New PdfDocument()
doc.LoadFromFile("D:\Startup PDF.pdf")

Dim bmp As Image = doc.SaveAsImage(0)
Dim emf As Image = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Metafile)

Dim zoomImg As Image = New Bitmap((emf.Size.Width * 2), (emf.Size.Height * 2))


Using g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(zoomImg)

g.ScaleTransform(2.0F, 2.0F)

g.DrawImage(emf, New Rectangle(New Point(0, 0), emf.Size), New Rectangle(New Point(0, 0), emf.Size), GraphicsUnit.Pixel)

End Using

bmp.Save("D:\convertToBmp.bmp", ImageFormat.Bmp)
System.Diagnostics.Process.Start("D:\convertToBmp.bmp")

DilipGandham
 
Posts: 1
Joined: Fri Jul 29, 2016 6:41 am

Fri Jul 29, 2016 8:21 am

Hi,

Thanks for your feedback.
I have noticed your issue and posted it to our Dev team. We will inform you when it is fixed.
Sorry for inconvenience.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed Jan 20, 2021 8:44 am

Dear DilipGandham,

Sorry for the long silence.

Glad to inform that your issue has been solved.

Welcome to download and test the latest Spire.Pdf v7.1 from the following links.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/7.1.10

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF