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.

Thu Sep 25, 2014 10:27 am

Hello All,

I am trying to convert HTML to PDF and then PDF to image.

But at the end of conversion I have seen images are blur and not in proper form. Used .png extension for images

So what are the additional settings needs to be done while conversion ? Also, while sending html; I am sending DIV tag only and NOT the whole html.

Please see attached files.

Regards,
David

davidfernandes
 
Posts: 7
Joined: Fri Sep 12, 2014 5:51 am

Fri Sep 26, 2014 2:41 am

Hello,

Thanks for your feedback.
Please try the below method to set a high resolution for output images.
Code: Select all
Image image = doc.SaveAsImage(0,Spire.Pdf.Graphics.PdfImageType.Metafile,300,300);
image.Save("result.png");

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Sep 26, 2014 4:42 am

Hey thanks for the reply,
So only Resolution we need to set ?
Also, how can we decide that we need to give resolution (300*300) less OR more than that ?

Regards,
David

davidfernandes
 
Posts: 7
Joined: Fri Sep 12, 2014 5:51 am

Fri Sep 26, 2014 8:46 am

Hello,

Thanks for your response.
At present it only set the Resolution to improve the output image.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDF