We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Issues converting from html to pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

68617 Sep 25,2007 04:39 PM Oct 3,2007 11:58 PM Windows Forms 2
loading
Tags: PDF
Sangeetha
Asked On September 25, 2007 04:39 PM

I was trying to convert a HTML string to a pdf file. I used the HTMLConvertor to convert the html string to an image using

HtmlConverter htmlConvertor = new HtmlConverter();
System.Drawing.Image srcImage = htmlConvertor.FromString(strHtml, ImageType.Metafile);

This worked fine. Now I converted this to a pdf using

IPDFGraphicState properties = doc.CreateGraphicState();
properties.SplitImages = true;
properties.BreakBehavior = AutoBreakBehavior.MultiLineTextBreak;

doc.LastPage.Graphics.DrawImage(PointF.Empty, srcImage, dest, properties);

When I convert this to pdf, I saw that there is some loss of data. The last couple of lines in my HTML were missing from the pdf generated.

Any idea if there is a work around for thsi issue?

Thanks.

Sangeetha
Replied On September 28, 2007 02:20 PM

More details on the issue:

This only happens with certain screen resolutions. When we do the conversion, with certain screen resolutions, there is no problem with the PDF generated. But with others, some content is not visible in the PDF. NOTE that the content is there in the PDF (If you select all the data in the pdf, copy it and paste it into any editor, you will see all the contents) It is just invisible.

I tried the following screen resolutions

800 * 600 - NO ISSUES
1024 * 768 - NO ISSUES
1152 * 864 - NO ISSUES
1280 * 720 - SOME CONTENT IN PDF NOT VISIBLE
1280 * 768 - SOME CONTENT IN PDF NOT VISIBLE
1280 * 7024 - SOME CONTENT IN PDF NOT VISIBLE

Any idea on how to get around this problem in syncfusion?

Thanks.
Sangeetha.

Administrator [Syncfusion]
Replied On October 3, 2007 11:58 PM

Hi Sangeetha,

Please followup the DirectTrac incident created in this regard.

Thanks,
Jaya

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;