All URIs are relative to https://us1.pdfgeneratorapi.com/api/v4
| Method | HTTP request | Description |
|---|---|---|
| addWatermark | POST /pdfservices/watermark | Add watermark |
| decryptDocument | POST /pdfservices/decrypt | Decrypt document |
| encryptDocument | POST /pdfservices/encrypt | Encrypt document |
| extractFormFields | POST /pdfservices/form/fields | Extract form fields |
| fillFormFields | POST /pdfservices/form/fill | Fill form fields |
| optimizeDocument | POST /pdfservices/optimize | Optimize document |
AddWatermark201Response addWatermark(add_watermark_request)
Add watermark
Adds a text or an image watermark to PDF document from base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let add_watermark_request = new PDFGeneratorAPI.AddWatermarkRequest(); // AddWatermarkRequest |
apiInstance.addWatermark(add_watermark_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| add_watermark_request | AddWatermarkRequest |
- Content-Type: application/json
- Accept: application/json
AddWatermark201Response decryptDocument(encrypt_document_request)
Decrypt document
Decrypts an encrypted PDF document from base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let encrypt_document_request = new PDFGeneratorAPI.EncryptDocumentRequest(); // EncryptDocumentRequest |
apiInstance.decryptDocument(encrypt_document_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| encrypt_document_request | EncryptDocumentRequest |
- Content-Type: application/json
- Accept: application/json
AddWatermark201Response encryptDocument(encrypt_document_request)
Encrypt document
Encrypts a PDF document from base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let encrypt_document_request = new PDFGeneratorAPI.EncryptDocumentRequest(); // EncryptDocumentRequest |
apiInstance.encryptDocument(encrypt_document_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| encrypt_document_request | EncryptDocumentRequest |
- Content-Type: application/json
- Accept: application/json
ExtractFormFields200Response extractFormFields(extract_form_fields_request)
Extract form fields
Extracts form fields and their metadata from a PDF document using base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let extract_form_fields_request = new PDFGeneratorAPI.ExtractFormFieldsRequest(); // ExtractFormFieldsRequest |
apiInstance.extractFormFields(extract_form_fields_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| extract_form_fields_request | ExtractFormFieldsRequest |
- Content-Type: application/json
- Accept: application/json
AddWatermark201Response fillFormFields(fill_form_fields_request)
Fill form fields
Fills form fields in a PDF document with provided data from base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let fill_form_fields_request = new PDFGeneratorAPI.FillFormFieldsRequest(); // FillFormFieldsRequest |
apiInstance.fillFormFields(fill_form_fields_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fill_form_fields_request | FillFormFieldsRequest |
- Content-Type: application/json
- Accept: application/json
OptimizeDocument201Response optimizeDocument(optimize_document_request)
Optimize document
Optimizes the size of a PDF document from base64 string or a remote URL.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.ServicesApi();
let optimize_document_request = new PDFGeneratorAPI.OptimizeDocumentRequest(); // OptimizeDocumentRequest |
apiInstance.optimizeDocument(optimize_document_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| optimize_document_request | OptimizeDocumentRequest |
- Content-Type: application/json
- Accept: application/json