Convert html to pdf and merge it with existing pdfs

I possess a System.Net.Mail.MailMessage which shall have it is actually html body and pdf accessories converted right into one singular pdf.

Changing the html physical body to pdf help me with this response

Turning the pdf add-ons into one pdf works with me using this response

Your code makes use of HTML Laborer, which is rather restricted in HTML to PDF sale, and which is actually proclaimed out-of-date. I recommend that you utilize XML Laborer rather.

After ~ 10 hours of trying I can easily not happen up with a combined service which carries out both. All I am actually getting are NullReferenceExceptions somewhere in IText resource, “the document is certainly not open”, and so on.

Below is the html I am actually making an effort to convert for referral every little thing is occurring except the css part.

Appears like the HTML Worker is actually finalizing the documents flow straight after analyzing. As a workaround, you might develop a pdf from your mailbody in mind. And after that incorporate this set along with the add-on to your ultimate pdf.

I would not phone on my own a fanboy, my business merely can’t afford to spend hundreds of dollars for a function which is certainly not a significant part of our program. I develop a.pdf from the mail.body in the Microsoft window Temp folder as well as simply incorporate it to the list for the PdfCopy author.

For instance, this will definitely toss no error however the leading pdf is going to only have the add-ons however not the html email body system

Presently i am actually merely able to convert html to pdf, css is certainly not being actually thought about.

Developing a PDF coming from HTML making use of C#?

I’ve listened to there is actually a technique to produce PDF documents. I need a C# structure however just about anything besides iTextSharp.

The API resembles GDI+, Likewise, they have something referred to as MigraDoc which could be utilized to generate a document in memory as well as after that render it to RTF, XPS, or PDF.

Its all available source and also totally free under the MIT license, in the event you wish to develop your own library you can easily observe just how they performed it.

Have a look at CutePDF. Since your colleague rejects to assist you I doubt highly he composed a platform for C#, he perhaps is doing what many of our company do when our company desire to make PDFS.

PDF is an available style (as is actually postscript), therefore in theory your coworker could have composed code making use of only StringBuilder that spits out raw postscript. But also for any type of kind of non-trivial text-based documents, he will have needed to either use a library like itextsharp, or even misuse tons of time.

Make an effort Pdf Sharp http://www.pdfsharp.net/

Please keep in mind I want to use C#. internet structure merely, not iTextSharp or some other electrical.

Leave a Reply

Your email address will not be published. Required fields are marked *