The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Error 34 The type 'Syncfusion.Pdf.HttpReadType' exists in both 'C:\Windows\assembly\GAC_MSIL\Syncfusion.Pdf.Base\9.103.0.20__3d67ed1f87d44c89\Syncfusion.Pdf.Base.dll' and
GMGeetha M Syncfusion Team 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).
2. HTML To PDF: 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;
Please try this and let us know if you have any questions.
Regards, Geetha
TPTravis PowellMarch 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.
Thanks!
Travis
GMGeetha M Syncfusion Team 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.