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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





98532 Mar 8,2011 12:04 AM UTC Mar 9,2011 09:03 AM UTC ASP.NET Web Forms (Classic) 3
Tags: PDF
Travis Powell
Asked On March 8, 2011 12:04 AM UTC

Hello, How do I resolve this error?

Error 34 The type 'Syncfusion.Pdf.HttpReadType' exists in both
'C:\Windows\assembly\GAC_MSIL\Syncfusion.Pdf.Base\\Syncfusion.Pdf.Base.dll' and


D:\Perforce\Current\Portal\WebGui\ASPX\ExportQueue.aspx.cs 293 76 D:\...\ASPX\

And is there anyway to pass cookies to HTML to PDF from String conversion?

Geetha M [Syncfusion]
Replied On March 8, 2011 07:23 AM UTC

Hi Travis,

Thank you for your interest in Syncfusion products.

1. To solve the Error:
You can avoid the error by removing the assemblies from the local folder (Bin).

It is possible to convert a HTML string to PDF. You may use the HTML string from the cookies as in the code given below.

PdfDocument pdf = new PdfDocument();
PdfPage page = pdf.Pages.Add();
int width = (int)page.GetClientSize().Width;

string html = Request.Cookies["Name"].Value;

using (HtmlConverter converter = new HtmlConverter())
converter.EnableHyperlinks = true;
converter.EnableJavaScript = true;

using (HtmlToPdfResult result = converter.Convert(html, ImageType.Metafile, width, -1, AspectRatio.KeepWidth))
PdfMetafileLayoutFormat format = new PdfMetafileLayoutFormat();
format.Layout = PdfLayoutType.Paginate;

result.Render(page, format);

pdf.Save("Sample.pdf", Response, HttpReadType.Save);

Please try this and let us know if you have any questions.


Travis Powell
Replied On March 8, 2011 06:34 PM UTC

Hi Geetha,

Thank you so much for the update. I'm wondering if it's possible to submit cookies to the converter as well. I haven't found any methods that allow me to send cookies, but I'm sure there must be a way.



Geetha M [Syncfusion]
Replied On March 9, 2011 09:03 AM UTC

Hi Travis,

Sorry for the confusion.

With the current implementation of HtmlConverter, it is not possible to access the webbrowser’s properties to and it does not have the support to add the cookies to the target response.

Please let us know if you have any other questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon