Instructions

How to use Rotativa.io from different languages and frameworks

Templates

Dev editing a PDF template

Are you looking to generate professional PDFs dynamically from your application? Rotativa.io’s template editor makes it easy to create, manage, and preview PDF templates using the powerful Liquid templating language. The Rotativa.io API will then serve your dynamic PDF documents, you’ll just need to send your data as a JSON document. In this guide, we’ll walk you through everything you need to know to get started.

Asp.Net Core

Creating PDF files in Asp.Net Core is really easy with the Rotativa.io Asp.Net Core client.

UPDATE: If you want a quick and easy alternative consider using the Rotativa.io Templates feature

Blazor

Creating PDF files in Blazor and calling them from the browser is really easy with the Rotativa.io Asp.Net Core client.

The Rotativa.io PDF service client will make a HTTP call to the Rotativa.io API service, This way you can bypass the typical problems that arise when attempting to install and operate PDF tools on a server. And you can deploy your code on Windows or Linux machines without any concerns about dealing with diverse environments.

.Net Core

I’ve developed a library that lets you use rotativa.io to create PDF files using Razor templates without requiring you to reference Asp.Net Core libraries. This makes it suitable to be used in console applications or Azure Functions (since it uses a HTTP call to build the PDF it will work even if on a Consumption Plan).

HTTP API

Now you can use Rotativa.io to create PDF docs by making a POST HTTP request to one of our endpoints.

Asp.Net MVC

This post is several years old, for an updated version look here: Create PDF in Asp.Net Core on Windows and Linux.

OR even better

Look at the new Rotativa.io Templates feature, for easier and faster development.

Using Rotativa.io is extremely easy and it will come natural to those familiar with Asp.Net MVC.

Asp.Net WebApi

Rotativa.io supports WebApi usage and in general usage outside of Asp.net MVC web app. As we will see later this feature can be used to build the PDF from Asp.net MVC too, in case you need to access directly either the pdf or the URL pointing to the PDF (stored on the cloud and accessible for 2 minutes).

NodeJs

Creating PDF files in Node.js using Rotativa.io is simple. You can either pass the service a URL or a HTML document. Making the call, using the request npm package, is this simple:

subscribe via RSS