PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Nov 01, 2024 1:04 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jun 04, 2015 9:59 pm 
Offline

Joined: Thu Jun 04, 2015 9:40 pm
Posts: 1
Hello, I will discuss my situation ...

I use PDFsharp to generate pdf from my application, for render code html y use HtmlRenderer specifically use versions:
PDFsharp v.1.50.3638.0 (PdfSharp.dll and PdfSharp.Charting.dll)
HtmlRenderer v1.5.0.6

When is generating the doc pdf show a exception:
An exception occurred in the type initializer 'TheArtOfDev.HtmlRenderer.PdfSharp.Adapters.GraphicsAdapter'

I can use any version of HtmlRenderer (HtmlRenderer v1.5.0.5 or HtmlRenderer v1.5.0.6) and works perfectly, every time I use the version of PDFsharp 1.32.3057.0. The problem only occurs when I upgrade to the version of PdfSharp.1.50.3638 beta.

One example of my code:
Code:
public byte[] GenerarPDFfromHTML(string htmlCode)
    {
        MemoryStream msBody = new MemoryStream();
        PdfDocument pdf = PdfGenerator.GeneratePdf(htmlCode, PageSize.Letter);//Here the exception
        pdf.Save(msBody, false);
        return msCuerpo.ToArray();
    }


will appreciate your help.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 06, 2015 6:28 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 346
The HtmlRenderer is a third party tool. I never tried it.
Please contact the authors of HtmlRenderer. They may need your HTML code to replicate the problem.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group