Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to generate a PDF from a template [closed]

In a C# application, I must generate a pdf document from a specific template wich includes fields and images.

So I've thought of creating a ".tex" which would be my template, then modify it from the application and finally use a API to get a PDF file from the ".tex" file

But I also heard of some API to generate a PDF file directly without using latex. However, I think that it will not be easy to reproduce the template with the API.

What is the easiest way and the best API ?

like image 846
Kyoros Avatar asked Sep 02 '13 08:09

Kyoros


1 Answers

I would recommend creating a HTML template and then converting it to PDF via https://code.google.com/p/wkhtmltopdf/ .

You can utilize Razor templating engine and get good Visual Studio support for creating you templates.

Its also easier to debug and fine-tune the result in a browser.

You can also find people to write HTML templates more easily.

like image 78
Tomas Grosup Avatar answered Sep 19 '22 23:09

Tomas Grosup