PDF Configurations

Supported configurations in the pdf_config field of PDF generation request payload

PDF configurations allow customizing the PDF to your needs.

This page discusses base and high-level PDF configs that are relevant for all PDFs regardless of their type. If you are interested in more than a base-level config for a particular PDF type, refer to the corresponding docs given below for each PDF type, which gives you in-depth picture for the particular case you are looking for. There are currently four types of PDFs supported:

Each has its own supported PDF configurations that you can use to alter the resulting PDF.

You are supposed to populate these configurations in the pdf_config field when passing the JSON payload to report_job endpoint or pdf_job endpoint. Some of the configs are generic and common across PDF types which are discussed below.

Common PDF Configs

Sample Payload

Example of a valid pdf_config payload that can be used for any PDF type:

"pdf_config": {
  "white_labelled": true,
  "company_profile": {
    "company_name": "DemoCorp Ltd.",
    "logo": "https://dummyimage.com/200x200/000/fff&text=Company+Logo",
    "professional_name": "John Doe Consulting",
    "website": "https://www.democorp.com",
    "email": "[email protected]",
    "phone": "+1-555-0123-456",
    "address": "1234 Demo Street, Demo City, 56789"
  },
  "notes": "This is a test note.",
  "custom_page_title": "Notes for You",
  "client_name": "John Doe",
  "lang": "es",
  "icon_style": "emoji",
  "number_of_recommendations": 15
}

Payload Explanation

Supported keys and values for pdf_config JSON field common across PDFs and their explanation is given below.

Note: None of these keys are required. In case not provided, defaults would be used.

KeyValue TypeDefaultSupported ValuesExplanation
white_labelledbooleanfalsetrue, falseWhether you want to white-label your PDF or not. If set to true, it would remove SelfDecode branding, and you'll have to provide your own branding info in the company_profile field (see next field)
company_profileJSONnullRefer to white-labelling section Note: Required only if white_labelled is set to true.
notesstring""Any simple textAny simple text notes you want to be displayed at the start of the PDF under the Notes section . If not provided, the notes section is omitted. To customize the title of the notes page, refer to next field.
custom_page_titlestring"Notes"Any simple textCustom title for the page displaying the notes.
client_namestringprofile nameAny simple textName of the intended recipient to be displayed on the PDF cover page. If not provided, profile name would be used as default.
langstring"en"en, he, es, fr, de, it, ar, pt, bgSupported languages are:

ENGLISH = "en" HEBREW = "he" SPANISH = "es" FRENCH = "fr" GERMAN = "de" ITALIAN = "it" ARABIC = "ar" PORTUGUESE = "pt" BULGARIAN = "bg"
icon_stylestring"standard"standard, hand, emojiYou can customize the icon set displayed to represent your varying levels of risk. For more details, refer to Icon Styles.
number_of_recommendationsintegercount of total recommendationsAny positive integerYou can limit the number of top recommendations to be displayed on the PDF by passing any positive integer value. If not provided, all relevant recommendations would be displayed.

White-labelling

Company profile has to be provided in the PDF config if you choose to white-label your PDF. It is a JSON value, that supports the keys given below.

Note: None of these fields are required. In case not provided, they won't be displayed on the PDF.

KeyValue TypeExplanation
logostringURL of your company logo to be displayed on the cover page
professional_namestringName of your company to be displayed on the PDF as primary name
company_namestringName of your company to be displayed on the PDF as secondary name
websitestringURL of your website
emailstring
phonestring
addressstring

PDF with SelfDecode branding






















PDF with your company's custom branding






















Notes

























Icon Styles

standard

hand

emoji