Skip to content

Repository files navigation

Pdfcrowd API - .NET Client

A .NET client library for the Pdfcrowd HTML to PDF API. Convert HTML, URLs, and various document formats to PDF and images.

Installation

Install via NuGet Package Manager:

Install-Package Pdfcrowd.Official

Or via .NET CLI:

dotnet add package Pdfcrowd.Official

Supported Platforms

  • .NET Framework 2.0+
  • .NET Standard 2.0+
  • .NET Core 2.0+
  • .NET 5+

Quick Start

using pdfcrowd;

// Create an API client instance
var client = new HtmlToPdfClient("your_username", "your_api_key");

// Convert a web page to PDF
client.convertUrlToFile("https://example.com", "example.pdf");

Usage Examples

Convert HTML String to PDF

var client = new HtmlToPdfClient("your_username", "your_api_key");
client.convertStringToFile("<html><body>Hello World!</body></html>", "hello.pdf");

Convert URL to PDF with Options

var client = new HtmlToPdfClient("your_username", "your_api_key");
client.setPageSize("Letter");
client.setOrientation("landscape");
client.convertUrlToFile("https://example.com", "example.pdf");

Convert HTML to Image

var client = new HtmlToImageClient("your_username", "your_api_key");
client.setOutputFormat("png");
client.convertUrlToFile("https://example.com", "example.png");

Getting Your API Credentials

  1. Sign up at pdfcrowd.com
  2. Find your API key in your account settings

Documentation

License

This library is distributed under the MIT license. See the LICENSE.txt file for details.

About

.NET client for the Pdfcrowd HTML to PDF API

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages