RAD Modules

RAD Modules

  • GitHub

›PDF

Documentation

  • Getting started

Security

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Keycloak integration
  • Advanced configuration
  • Attribute-based access control

Mailer

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Notifications

  • Notifications service
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Scheduler

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

PDF

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Serverless functions

  • Details
  • Create file
  • Get files
  • Delete file
  • Resize images
  • Watermark
  • RAD Security integration
  • Bitbucket pipelines

Admin panel

  • Introduction

Services communication

  • Communication between services

Changelog

  • Details

Introduction

Description:

Pdf service provides a ready-to-use rendering HTML content from URL or HTML string, which can be used to convert HTML to PDF.

To convert a pdf document use the HTTP POST method:

/api/pdf/create-pdf

Example:

create PDF from remote URL

curl -X POST "http://localhost:50050/api/pdf/create-pdf" -H  "accept: application/json" -H  "Content-Type: application/json" -d \
'
  {
    "from":"http://www.example.com",
    "type":"uri"
  }
'

or, from HTML string

curl -X POST "http://localhost:50050/api/pdf/create-pdf" -H  "accept: application/json" -H  "Content-Type: application/json" -d \
'
  {
    "from":"<p>HTML string</p>",
    "type":"html"
  }
'

Response:

{
  "url":"http://localhost:50050/api/download-pdf/5409e654-9bac-4869-844c-5715e49159e0",
  "expiryAt":"2020-05-29T10:16:06.086Z"
}

url: link for download pdf file

expiryAt: Link expiration time. By default, download links are valid for 3600 seconds (1 hour). The expiration time can be adjusted by setting PDF_DOWNLOAD_LINK_EXPIRATION environment variable

For customize PDF rendering, you can send optional pdfOptions to create-pdf endpoint.

Example:

curl -X POST "http://localhost:50050/api/pdf/create-pdf" -H  "accept: application/json" -H  "Content-Type: application/json" -d \
'
  {
    "from": "https://www.example.com",
    "type": "uri",
    "pdfOptions": {
      "format": "Letter"
    }
  }
'

For more info, go to next section

← Advanced configurationGetting started →
  • Description:
RAD Modules
Docs
Getting startedChangelogRAD Modules API Doc
Services
SecurityMailerNotificationsServerless functionsSchedulerPdf generatorAdmin panel
Support:
GitHubhello@tsh.io
Copyright © 2021 The Software House