Job Request Creation
Once the file is uploaded, create a job request to process the file conversion.
Job Request Example (cURL):
curl -X POST https://api.fileverbs.com/api/v1/jobrequests \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"CustomId": "custom-job-id-123",
"Action": "PdfToDocx",
"Parameters": {
"FileIds": ["5f8b26e9e2c9a8a739b2bb44"]
},
"Summary": "Convert PDF to DOCX"
}'
Job Request Example (C#):
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
var client = new HttpClient();
var requestBody = new {
CustomId = "custom-job-id-123",
Action = "PdfToDocx",
Parameters = new {
FileIds = new string[] { "5f8b26e9e2c9a8a739b2bb44" }
},
Summary = "Convert PDF to DOCX"
};
var jsonString = JsonConvert.SerializeObject(requestBody);
var content = new StringContent(jsonString, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.fileverbs.com/api/v1/jobrequests", content);
response.EnsureSuccessStatusCode();
Job Request Example (Java):
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.OutputStream;
public class JobRequestExample {
public static void main(String[] args) throws Exception {
String url = "https://api.fileverbs.com/api/v1/jobrequests";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR...");
con.setRequestProperty("Content-Type", "application/json");
String jsonInputString = "{\"CustomId\": \"custom-job-id-123\", \"Action\": \"PdfToDocx\", \"Parameters\": { \"FileIds\": [\"5f8b26e9e2c9a8a739b2bb44\"], \"InstantConversion\": true, \"Summary\": \"Convert PDF to DOCX\"}";
con.setDoOutput(true);
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes("utf-8");
os.write(input, 0, input.length);
}
int responseCode = con.getResponseCode();
System.out.println("Response Code : " + responseCode);
}
}
Job Request Example (Python):
import requests
import json
url = "https://api.fileverbs.com/api/v1/jobrequests"
headers = {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR...',
'Content-Type': 'application/json'
}
payload = {
"CustomId": "custom-job-id-123",
"Premium": True,
"Action": "PdfToDocx",
"Parameters": {
"FileIds": ["5f8b26e9e2c9a8a739b2bb44"]
},
"Summary": "Convert PDF to DOCX"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.status_code)
print(response.json())
Response:
{
"status": "JobRequest created successfully",
"jobId": "603c9d91f7f1c51774f55ed1"
}
Below are the key details of the JobRequestDto model used to handle job requests:
JobRequestDto
- Id: Unique identifier for the job request.
- CustomId: Optional custom ID assigned to the job.
- Action: Type of action to be performed (e.g., PDF to DOCX conversion).
- Parameters: Input parameters for the job, encapsulated in ParametersDto.
- Summary: A summary description of the job.
ParametersDto
This class holds the parameters for the job, including:
- FileIds: A list of file IDs associated with the job.
- Options: Specific options for the job, encapsulated in OptionsDto.
OptionsDto
This class defines additional settings and customizations for the job, such as:
- OutputSettings: Settings related to output files (e.g., output file name).
- ParsingType: The parsing type to be applied to the job.
- More Settings: Additional settings will be covered in their respective conversion-specific documentation (e.g., PDF to Word, PDF to Image).
Example Job Request
{
"CustomId": "custom-job-id-123",
"Action": "PdfToDocx",
"Parameters": {
"FileIds": ["5f8b26e9e2c9a8a739b2bb44"]
},
"Summary": "Convert PDF to DOCX"
}
Action Types
The following are the supported action types for job requests in FileVerbs. Each action performs a specific operation on one or more files.
π PDF Conversion & Processing Actions
- PdfToDoc: Convert PDF to DOC
- PdfToDocx: Convert PDF to DOCX
- PdfToXlsx: Convert PDF to XLSX
- PdfToSingleSheet: Convert PDF to a single Excel sheet
- PdfToXls: Convert PDF to XLS
- PdfToPng: Convert PDF to PNG
- PdfToJpeg: Convert PDF to JPEG
- PdfToBmp: Convert PDF to BMP
- PdfToGif: Convert PDF to GIF
- PdfToTiff: Convert PDF to TIFF
- PdfToEmf: Convert PDF to EMF
- PdfToSvg: Convert PDF to SVG
- PdfToPowerPoint: Convert PDF to PowerPoint (PPTX)
- PdfToHtml: Convert PDF to HTML
- PdfToCsv: Convert PDF to CSV
- PdfToOds: Convert PDF to ODS
- PdfToXmlSpreadsheet: Convert PDF to XML Spreadsheet
- PdfToEpub: Convert PDF to EPUB
- PdfToText: Extract plain text from PDF
- PdfToLatex: Convert PDF to LaTeX
- PdfToXps: Convert PDF to XPS
π§© PDF Enhancements
- PdfMerge: Merge multiple PDFs into one
- PdfWatermark: Add watermark to PDF
- PdfHeaderFooter: Add header and footer to PDF
- PdfDeletePage: Delete specific pages from PDF
- PdfPageNumber: Add page numbers
- PdfSplit: Split PDF into multiple parts
- PdfBackground: Add background image or color
- PdfRotation: Rotate pages
- PdfCompress: Reduce PDF file size
- PdfEncrypt: Encrypt PDF with password
- PdfDecrypt: Remove encryption
π PDF Extraction Features
- PdfExtractMetadata: Extract metadata (title, author, etc.)
- PdfExtractAttachments: Extract embedded attachments
- PdfExtractBookmarks: Extract bookmark structure
- PdfExtractTables: Extract tables as CSV or JSON
- PdfTextByArea: Extract text from selected area (x, y, width, height)
- PdfSplitByBookmark: Split by bookmarks
- PdfPageReorder: Reorder pages
π PDF Annotation & Redaction
- PdfAddComment: Add annotation comments
- PdfDeleteComment: Delete annotation comments
- PdfRedact: Redact sensitive data
- PdfFlatten: Flatten annotations and form fields
π§Ύ Word Conversion Actions
- WordToPdf: Convert Word to PDF
- WordToPdfEmbeddedFonts: Convert Word to PDF with embedded fonts
- WordToPdfPassword: Convert Word to password-protected PDF
- WordToHtml: Convert Word to HTML
- WordToHtmlEmbedded: Convert Word to HTML with embedded resources
- WordToMarkdown: Convert Word to Markdown
- WordToEpub: Convert Word to EPUB
- WordToOdt: Convert Word to ODT
- WordToRtf: Convert Word to RTF
- WordToCsv: Convert Word to CSV
- WordToText: Extract text from Word
- WordToTextWithOcr: Extract text from Word including OCR image content
- WordToSvg: Convert Word to SVG
- WordToTiff: Convert Word to TIFF
- WordToXps: Convert Word to XPS
π Word Content Control
- WordPageRange: Convert specific page range
- WordSplitter: Split Word into pages
- WordRemoveBlankPages: Remove empty pages from Word
- WordMergeMultipleFiles: Merge multiple Word documents
π Word Extraction & Annotation
- WordExtractMetadata: Extract metadata
- WordExtractComments: Extract comments
- WordAddComment: Add comments to paragraphs
- WordDeleteComment: Delete comments by condition or all
- WordExtractImages: Extract embedded images
π¨ Word Formatting
- WordAddWatermark: Add watermark to all Word pages
Note: Some actions require additional settings under parameters.options
. Refer to each actionβs documentation for input schema.