html - ASP.NET MVC: render view to generate PDF: use iTextSharp or better solution? -


I display the receipt in both the HTML and printer versions. The HTML version can be saved as HTML without the jQuery tab, etc., while printer-friendly Zero Script and external dependencies, no master layout, no additional buttons, inline CSS, and problems.

Since I use Spark, see the engine, although it is a good idea to make PDF using iTextSharp engine though. But after some paragraphs, I decided that it is very cumbersome because a) I have to rewrite the entire receipt (source spark view is approximately 5 pages long) b) I have problems with iTextSharp from the beginning - for example, The numbered lists were kept in bulleted indentation, and indentationLeft = "20" did not work - possibly due to the lack of documentation, but see (A).

Therefore, my expectations for PDF are very simple: I want to keep the same HTML but insert page breaks between individual receipts (yes I have many people in the same document).

Is any strange engine?

Update: Tried the community HTMLDoc version; I did not use my inline CSS styles, incorrectly displayed unicode symbols for postures. Raised the CSS but failed for the currency symbol; I think problem with encoding has been resolved by setting charset in URF-8 Wkhtmltopdf looks good, but I'm still trying to set page breaks ...

If you have HTML in memory then you can convert it to PDF. I have used something like this once. This is a Java framework that bundles iText and is capable of converting an HTML stream into a PDF. As has been written in Java I have used to convert the jar file into a .NET assembly and use it directly from the managed code.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -