# PDF generation on Umbraco Cloud

**URL:** <https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220>\
**Category:** Questions\
**Tags:** umbraco-cloud\
**Created:** [October 6, 2025, 10:44am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220 "2025-10-06T10:44:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 6, 2025, 10:44am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/1 "2025-10-06T10:44:36Z")

</div>

Hi hive mind,

I have a requirement to generate server side customised PDFs, probably using HTML as the source (HTML→PDF) within an Umbraco Cloud solution. Does anyone have any experience with this who can suggest libraries known to work within Umbraco Cloud.

I know I also want to have my cake and be able to eat it… but a library which is open source/not too expensive would also help this client too.

I am also in two minds as the the architecture for this, as it could be done in process within Umbraco, or as an external service. Any thoughts/experience?

Thanks

---

<div class="post-metadata">

**Author:** ![mistyn8](https://forum.umbraco.com/user_avatar/forum.umbraco.com/mistyn8/32/671_2.png) [@mistyn8](https://forum.umbraco.com/u/mistyn8)\
**Post date:** [October 6, 2025, 12:14pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/2 "2025-10-06T12:14:47Z")

</div>

Rather than a library to take html to pdf.. the modern alternative is to use [NuGet Gallery | PuppeteerSharp 20.2.2](https://www.nuget.org/packages/puppeteersharp/) to use chrome | firefox native savetoPdf

[https://discord-chats.umbraco.com/t/22731634/solved-pdf-generator](https://discord-chats.umbraco.com/t/22731634/solved-pdf-generator)

Though you’d set this up on an other server so a little legwork, and depending if you have an alternative server could be a cost involved.. (can’t run the chrome binary required in azure app service, but can do this via appContainer on azure)

Could also use the native [Puppeteer | Puppeteer](https://pptr.dev/) via javascript if not wanting to use .net, I think…

---

<div class="post-metadata">

**Author:** ![greystate](https://forum.umbraco.com/user_avatar/forum.umbraco.com/greystate/32/301_2.png) [@greystate](https://forum.umbraco.com/u/greystate)\
**Post date:** [October 6, 2025, 12:32pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/3 "2025-10-06T12:32:32Z")

</div>

Hi lakesol 👋

We’ve had a few of these requests too, but in all cases we ended on me running a script locally that fetched the ~100 pages and generated the PDFs (using `wkhtmltopdf`), then uploading them to a folder, from where they are served on the site as static PDFs.

This was based on the _actual_ necessity of them being 100% up to date, the moment something changed in Umbraco (spoiler: they were not) and the frequency of which they were requested.

Your mileage may vary of course, just wanted to throw this in, in case you didn’t actually **have** to have them being generated on the fly by some kind of robot/machine setup

/Chriztian

---

<div class="post-metadata">

**Author:** ![markadrake](https://forum.umbraco.com/user_avatar/forum.umbraco.com/markadrake/32/954_2.png) [@markadrake](https://forum.umbraco.com/u/markadrake)\
**Post date:** [October 6, 2025, 12:34pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/4 "2025-10-06T12:34:56Z")

</div>

@lakesol Despite not knowing the entire scope of your request (how dynamic, how often, for whom) I’d like to offer you some advice. I work with budget-constrained clients as well, many nonprofits. Their need to generate PDFs was out of convenience, and it wasn’t very often. I built a report for them out of HTML and a print-friendly stylesheet, coached them to use **Print → Save as PDF** in their browsers, and they were happy.

I’m sure there are [open source nuget packages](https://www.nuget.org/packages/SimpleHtmlToPdf/) you can try and use, but perhaps your issue can be solved through client training/education.

---

<div class="post-metadata">

**Author:** ![skttl](https://forum.umbraco.com/user_avatar/forum.umbraco.com/skttl/32/260_2.png) [@skttl](https://forum.umbraco.com/u/skttl)\
**Post date:** [October 7, 2025, 7:23am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/5 "2025-10-07T07:23:20Z")

</div>

We have a few sites using [Rotativa](https://www.nuget.org/packages/rotativa.aspnetcore#readme-body-tab).

It’s basically a wrapper of wkhtmltopdf (WebKit html to pdf). It works great, but the rendering engine is a bit out of date.

IIRC you can’t run Puppetteer or headles Chrome in Azure Web Apps / Umbraco Cloud.

---

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 7, 2025, 7:59am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/6 "2025-10-07T07:59:26Z")

</div>

Thanks for the information. I had seen this tool bit ideally was looking for something which can work in process as future requirements may mean we want to personalise the PDF documents. But at the moment this may be the best option.

---

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 7, 2025, 8:00am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/7 "2025-10-07T08:00:28Z")

</div>

Thanks this architecture may be a good approach if we cannot run in process, i.e. hook into the publish pipeline to instigate an out of process update of the PDFs

---

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 7, 2025, 8:01am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/8 "2025-10-07T08:01:00Z")

</div>

Many thanks

---

<div class="post-metadata">

**Author:** ![mistyn8](https://forum.umbraco.com/user_avatar/forum.umbraco.com/mistyn8/32/671_2.png) [@mistyn8](https://forum.umbraco.com/u/mistyn8)\
**Post date:** [October 7, 2025, 8:23am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/9 "2025-10-07T08:23:34Z")

</div>

Doesn’t Rotativa require access to the _wkhtmltopdf.exe_, have you got that working on an azure\_appservice in process (either inside or outside of cloud) I thought anything relying on a binary executable was off the cards?

---

<div class="post-metadata">

**Author:** ![mistyn8](https://forum.umbraco.com/user_avatar/forum.umbraco.com/mistyn8/32/671_2.png) [@mistyn8](https://forum.umbraco.com/u/mistyn8)\
**Post date:** [October 7, 2025, 8:26am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/10 "2025-10-07T08:26:13Z")

</div>

So with puppetter you get it to consume a page from your site, and save as pdf… Basically as if you visited the page.

Simplistically you can use an alttemplate and pass query params as the url you give to puppeteer. You can even pass the asp.identity cookie for use with protected content pages. To get your personalised pdf’s.

---

<div class="post-metadata">

**Author:** ![paulsterling](https://forum.umbraco.com/user_avatar/forum.umbraco.com/paulsterling/32/188_2.png) [@paulsterling](https://forum.umbraco.com/u/paulsterling)\
**Post date:** [October 7, 2025, 8:55pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/11 "2025-10-07T20:55:58Z")

</div>

I’ll toss in one other approach that we use to generate 100’s of PDFs/day - a 3rd-party conversion Api. We use Cloudmersive’s Convert Api ( [Convert API - Cloudmersive APIs](https://cloudmersive.com/convert-api) ) but I know there are other offerings as well - I’ve no special attachment to Cloudmersive, it’s just one we’ve used successfully for 4+ years now. The cost is nominal - about 12 USD/month.

In our case we use the HTML string to PDF endpoint with embedded CSS and it gives us fine grained control over both layout and content. Every PDF is unique for us.

They offer a dotnet client so integrating into Umbraco is super simple (or any dotnet app).

```csharp
var CloudmersiveConvertApiClient = require(‘cloudmersive-convert-api-client’);
var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;

```

```csharp
// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications[‘Apikey’];
Apikey.apiKey = ‘YOUR API KEY’;

```

```csharp
var apiInstance = new CloudmersiveConvertApiClient.ConvertWebApi();

```

```csharp
var input = new CloudmersiveConvertApiClient.HtmlToPdfRequest(); 
// HtmlToPdfRequest | HTML to PDF request parameters

```

```csharp
var callback = function(error, data, response) {
if (error) 
{console.error(error);} 
else 
{console.log('API called successfully. Returned data: ’ + data);}};

apiInstance.convertWebHtmlToPdf(input, callback);

```

---

<div class="post-metadata">

**Author:** ![cheeseytoastie](https://forum.umbraco.com/user_avatar/forum.umbraco.com/cheeseytoastie/32/1423_2.png) [@cheeseytoastie](https://forum.umbraco.com/u/cheeseytoastie)\
**Post date:** [October 8, 2025, 9:10am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/12 "2025-10-08T09:10:29Z")

</div>

I do it in a similar way but with SelectPdf via their API

No real reason to choose them but again - it’s quietly done a job for not much money for a few years now.

Same idea - generate a html string using a view (built a simple viewRender service based on [https://stackoverflow.com/a/57888901](https://stackoverflow.com/a/57888901)) and post it to them via another service. Returns a memory stream and serve that back on a post request.

```auto
return new FileStreamResult(memoryStream, "application/pdf");

```

---

<div class="post-metadata">

**Author:** ![JasonElkin](https://forum.umbraco.com/user_avatar/forum.umbraco.com/jasonelkin/32/133_2.png) [@JasonElkin](https://forum.umbraco.com/u/JasonElkin)\
**Post date:** [October 8, 2025, 10:49am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/13 "2025-10-08T10:49:44Z")

</div>

Running a browser in-process on a webserver can be rather problematic for performance.

If not puppeteer, an API as suggested by @cheeseytoastie and @paulsterling will be a better approach.

> [@skttl](#):
>
> It works great, but the rendering engine is a bit out of date.

Compatibility is a moving target and styles can be hard to debug since what the engine renders vs. what you would see from Chromium/Firefox will be different - especially if you start using some of the more modern CSS in anger.

> [@lakesol](#):
>
> we want to personalise the PDF documents

Do the personalization when you generate the HTML, and just have Puppeteer/API/whatever do the conversion bit.

---

<div class="post-metadata">

**Author:** ![c9mb](https://forum.umbraco.com/user_avatar/forum.umbraco.com/c9mb/32/1142_2.png) [@c9mb](https://forum.umbraco.com/u/c9mb)\
**Post date:** [October 8, 2025, 9:59pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/14 "2025-10-08T21:59:21Z")

</div>

FWIW - I use [Select PDF](https://www.selectpdf.com) for my custom PDF requirements.  
They have a good HTML→PDF API generator, as well as a .Net library.  
I find the HTML→PDF API to be accurate and uses the Chrome engine so is up-to-date with most CSS

---

<div class="post-metadata">

**Author:** ![Rockerby](https://forum.umbraco.com/user_avatar/forum.umbraco.com/rockerby/32/123_2.png) [@Rockerby](https://forum.umbraco.com/u/Rockerby)\
**Post date:** [October 8, 2025, 11:30pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/15 "2025-10-08T23:30:27Z")

</div>

Throwing my “pdf gen” hat in the ring; for smaller usage I spun up a super simple API that uses a wkhtml C# wrapper, accepts a URL from a POST request, generates said PDF then sends it back.

Needs to be hosted somewhere (I had a little Windows VPS running) and the page you want to convert needs to be public facing.

---

<div class="post-metadata">

**Author:** ![cheeseytoastie](https://forum.umbraco.com/user_avatar/forum.umbraco.com/cheeseytoastie/32/1423_2.png) [@cheeseytoastie](https://forum.umbraco.com/u/cheeseytoastie)\
**Post date:** [October 9, 2025, 8:34am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/16 "2025-10-09T08:34:36Z")

</div>

I like it. How much does this cost a month - and do you have to keep an eye on it from crashing etc?

I like the fire and forget approach of the API but costs are always a consideration - especially with charity clients.

---

<div class="post-metadata">

**Author:** ![Rockerby](https://forum.umbraco.com/user_avatar/forum.umbraco.com/rockerby/32/123_2.png) [@Rockerby](https://forum.umbraco.com/u/Rockerby)\
**Post date:** [October 9, 2025, 11:11am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/17 "2025-10-09T11:11:06Z")

</div>

I have a mail relay setup on the actual API that sends an email if there’s an issue or if it’s requested from a domain I didn’t expect (it’s server to server with basic auth, but you never know…)

Other than that I send a 500 back to the caller so I just handle that as if I were handling any other external API error.

I use [eUK](https://www.eukhost.com/windows-vps-hosting) for some of my hosting, so already had a server there. I’m sure there will be cheaper, but bobby basic VPS will set you back £25+VAT

---

<div class="post-metadata">

**Author:** ![mistyn8](https://forum.umbraco.com/user_avatar/forum.umbraco.com/mistyn8/32/671_2.png) [@mistyn8](https://forum.umbraco.com/u/mistyn8)\
**Post date:** [October 9, 2025, 12:37pm UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/18 "2025-10-09T12:37:22Z")

</div>

If you’re already on azure..  
For Azure Container Apps (the modern serverless app container platform):

- **Pricing is usage-based:** You get a free grant each month (180,000 vCPU-seconds, 360,000 GiB-seconds, 2 million requests).

---

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 10, 2025, 9:16am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/19 "2025-10-10T09:16:29Z")

</div>

Thanks for the input. Yes, we would always have the HTML personalised, and the PDF conversion “dumb” and just convert formats.

---

<div class="post-metadata">

**Author:** ![lakesol](https://forum.umbraco.com/user_avatar/forum.umbraco.com/lakesol/32/3686_2.png) [@lakesol](https://forum.umbraco.com/u/lakesol)\
**Post date:** [October 10, 2025, 9:23am UTC](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220/20 "2025-10-10T09:23:15Z")

</div>

This has all been great feedback.

For the SelectPdf advocates, how are you seeing the performance of this when converting PDFs? I did a test locally and found it quite slow. Hence I am looking at solutions where the PDF generation can be done out of process.

I have just done some testing too on Puppeteer. Performance seems quite good. Output seems OK to control, however more complex header/footer support than SelectPdf.

[Next page](https://forum.umbraco.com/t/pdf-generation-on-umbraco-cloud/6220.md?page=2)
