Increo PDF Rendrer

Simple service to render a single, or multiple URL's to a PDF with various options.

The base URL for the service is https://pdf.increo.no/render.

Usage with GET

You can either add a single URL with the url query-string, or multiple URL's by using the urls with a JSON serialized list of URL's.

Example

https://pdf.increo.no/render?url=https://vg.no

or

https://pdf.increo.no/render?urls=['https://vg.no','https://db.no']

Usage with POST

With POST you can add the list of URL's as a body payload.

Example

{
    "https://vg.no",
    "https://db.no"
}

Options

You can apply various options by adding query-string parameters to the URL, whether you use GET or POST.

Set Filename

Use the filename option to set the filename of the PDF returned. If no filename option is specified DateTime.Now.Ticks will be used. The .pdf will be automatically applied to the given filename.

Example: https://pdf.increo.no/render?url=https://vg.no&filename=test

Force A4

By default the renderer renders to letter format. You can set mediabox to a4 to force it to render to A4.

Example: https://pdf.increo.no/render?url=https://vg.no&mediabox=a4

Limit Total Pages

By default it should render a number of pages to match the length of the HTML document. You can set the total number of pages with the limit-pages param.

Example: https://pdf.increo.no/render?url=https://vg.no&limit-pages=5

Landscape

By default it renders to portrait. To render to landscape, use the landscape param.

Example: https://pdf.increo.no/render?url=https://vg.no&landscape=1

Usage with Fields

You can use an already existing PDF file with fields to edit and fill the fields.

Example: POST https://pdf.increo.no/fields

Payload:

{
    "url": "https://http.path.to/pdf.pdf",
    "fields": {
        "Header": "TEST-HEADER",
        "txt_bold": "THIS IS BOLD TEXT, AND UPPER CASE.",
        "txt_italic": "this text should be italic, and lower case."
    }
}

Or if you just want to fill the fields in order:

{
    "url": "https://http.path.to/pdf.pdf",
    "listOfValues": [
        "value-for-field-1",
        "value-for-field-2"
    ]
}

You can also specify a base64-string of the PDF instead of supplying a URL:

{
    "base64": "your-base64-string-here",
    "fields": {
        "key": "value"
    }
}