{ "openapi": "3.0.1", "info": { "title": "ConvertAPI", "description": "# High-Performance File Conversion API\nConvert Word, Excel, PowerPoint, HTML, PDF and Image formats with our powerful file conversion service.\nWe support more than [200 file types.]( https://www.convertapi.com/doc/file-formats)", "termsOfService": "https://www.convertapi.com/terms", "contact": { "url": "https://www.convertapi.com/support", "email": "support@convertapi.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "v2" }, "servers": [ { "url": "https://v2.convertapi.com" }, { "url": "https://eu-v2.convertapi.com" }, { "url": "https://uk-v2.convertapi.com" }, { "url": "https://us-v2.convertapi.com" }, { "url": "https://ca-v2.convertapi.com" }, { "url": "https://as-v2.convertapi.com" }, { "url": "https://au-v2.convertapi.com" } ], "paths": { "/convert/pdf/to/print": { "summary": "PDF Print Production API", "description": "Prepare print-ready PDFs with trim, bleed, marks, color spaces, output intents, ICC profiles, and image downsampling.", "post": { "tags": [ "Conversion" ], "externalDocs": { "description": "Read more about the converter", "url": "https://www.convertapi.com/pdf-to-print" }, "requestBody": { "content": { "multipart/form-data": { "schema": { "required": [ "File" ], "type": "object", "properties": { "Timeout": { "maximum": 1200, "minimum": 10, "type": "integer", "description": "Conversion timeout in seconds.", "default": 900, "x-ca-featured": false, "x-ca-label": "Timeout", "x-ca-group": "Execution", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "1200" } }, "StoreFile": { "type": "boolean", "description": "When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted.\r\n\r\nWhen `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content.\r\n", "default": false, "x-ca-featured": false, "x-ca-label": "Store file", "x-ca-group": "Output", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "File": { "type": "string", "description": "File to be converted. Value can be URL or file content.", "format": "binary", "x-ca-featured": true, "x-ca-label": "File", "x-ca-group": "Input", "x-ca-type": "File", "x-ca-representation": "Default", "x-ca-allowed-extensions": [ "pdf" ] }, "FileName": { "type": "string", "description": "The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and\r\nunique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the\r\ncorrect file extension based on the target format, and includes an indexing feature to distinguish multiple output files\r\nfrom a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file,\r\nor `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable.", "x-ca-featured": false, "x-ca-label": "Output file name", "x-ca-group": "Output", "x-ca-type": "String", "x-ca-representation": "Default", "x-ca-range": { "from": "1", "to": "200" } }, "Password": { "type": "string", "description": "Sets the password to open protected PDF.", "x-ca-featured": false, "x-ca-label": "Open password", "x-ca-group": "Input", "x-ca-type": "String", "x-ca-representation": "Default" }, "TrimSize": { "enum": [ "default", "a2", "a3", "a4", "a5", "a6", "letter", "legal", "custom" ], "type": "string", "description": "Page size to enforce on every page. `Default` keeps each page’s current size; `Custom` activates `TrimWidth` / `TrimHeight`.", "default": "default", "x-ca-featured": false, "x-ca-label": "Trim size", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "default": "Default", "a2": "A2", "a3": "A3", "a4": "A4", "a5": "A5", "a6": "A6", "letter": "Letter", "legal": "Legal", "custom": "Custom" } }, "TrimWidth": { "maximum": 1000, "minimum": 10, "type": "integer", "description": "Width of Trim Box in millimeters (mm) when `TrimSize` is set to `Custom`.", "x-ca-featured": false, "x-ca-label": "Trim width", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "1000" } }, "TrimHeight": { "maximum": 1000, "minimum": 10, "type": "integer", "description": "Width of Trim Box in millimeters (mm) when `TrimSize` is set to `Custom`.", "x-ca-featured": false, "x-ca-label": "Trim height", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "1000" } }, "BleedTop": { "maximum": 30, "minimum": 0, "type": "integer", "description": "Thickness of bleed added above the Trim Box (top edge). Specify a single numeric value in millimeters (mm) to extend the page beyond the trim area at the top for full-bleed printing.", "default": 3, "x-ca-featured": false, "x-ca-label": "Bleed top", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "0", "to": "30" } }, "BleedRight": { "maximum": 30, "minimum": 0, "type": "integer", "description": "Thickness of bleed added to the right of the Trim Box (right edge). Specify a single numeric value in millimeters (mm) to extend the page beyond the trim area on the right for full-bleed printing.", "default": 3, "x-ca-featured": false, "x-ca-label": "Bleed right", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "0", "to": "30" } }, "BleedBottom": { "maximum": 30, "minimum": 0, "type": "integer", "description": "Thickness of bleed added below the bottom of the Trim Box (bottom edge). Specify a single numeric value in millimeters (mm) to extend the page beyond the trim area at the bottom for full-bleed printing.", "default": 3, "x-ca-featured": false, "x-ca-label": "Bleed bottom", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "0", "to": "30" } }, "BleedLeft": { "maximum": 30, "minimum": 0, "type": "integer", "description": "Thickness of bleed added to the left of the Trim Box (left edge). Specify a single numeric value in millimeters (mm) to extend the page beyond the trim area on the left for full-bleed printing.", "default": 3, "x-ca-featured": false, "x-ca-label": "Bleed left", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "0", "to": "30" } }, "BleedMode": { "enum": [ "none", "mirror", "stretch" ], "type": "string", "description": "Defines how additional bleed content is generated when bleed is requested. Choose `Mirror` to mirror page content outward into the bleed area for a realistic full-bleed preview, `Stretch` to extend edge pixels into the bleed, or `None` to disable bleed fabrication.", "default": "none", "x-ca-featured": false, "x-ca-label": "Bleed mode", "x-ca-group": "Bleed, Trim & Margins", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "none": "None", "mirror": "Mirror", "stretch": "Stretch" } }, "TrimMarks": { "type": "boolean", "description": "Adds crop marks outside the Bleed Box.", "default": false, "x-ca-featured": false, "x-ca-label": "Trim marks", "x-ca-group": "Printing Marks", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "RegistrationMarks": { "type": "boolean", "description": "Adds registration targets centred ≥3mm outside Bleed Box on each edge.", "default": false, "x-ca-featured": false, "x-ca-label": "Registration marks", "x-ca-group": "Printing Marks", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "Slug": { "type": "string", "description": "Text placed on the bottom of the Media Box (e.g., printed file name, order number, customer information, etc.).", "x-ca-featured": false, "x-ca-label": "Slug", "x-ca-group": "Printing Marks", "x-ca-type": "String", "x-ca-representation": "Default" }, "TintBars": { "type": "boolean", "description": "Adds grayscale and color control bars at the top of the page, positioned outside the Trim Box.", "default": false, "x-ca-featured": false, "x-ca-label": "Tint bars", "x-ca-group": "Printing Marks", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "ColorSpace": { "enum": [ "default", "rgb", "cmyk", "gray" ], "type": "string", "description": "Set PDF color space. The `Default` option leaves the color space as is.", "default": "default", "x-ca-featured": false, "x-ca-label": "Color space", "x-ca-group": "Color Management", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "default": "Default", "rgb": "RGB", "cmyk": "CMYK", "gray": "Gray" } }, "OutputIntent": { "enum": [ "none", "fogra39", "fogra51", "gracol2013", "swop2013", "japancolor2011", "custom" ], "type": "string", "description": "Embeds ICC profile as PDF OutputIntent. Choosing `Custom` requires `OutputIntentIccFile` to be provided.", "default": "none", "x-ca-featured": false, "x-ca-label": "Output intent", "x-ca-group": "Color Management", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "none": "None", "fogra39": "FOGRA39 (ISO Coated v2)", "fogra51": "FOGRA51 (PSO Coated v3)", "gracol2013": "GRACoL 2013 (CGATS 21_CRPC6)", "swop2013": "SWOP 2013 (CGATS 21_CRPC5)", "japancolor2011": "Japan Color 2011 Coated", "custom": "Custom" } }, "OutputIntentIccFile": { "type": "string", "description": "Embeds ICC profile as PDF OutputIntent. Required when `OutputIntent` is set to `custom`.", "format": "binary", "x-ca-featured": false, "x-ca-label": "Output Intent Icc File", "x-ca-group": "Color Management", "x-ca-type": "File", "x-ca-representation": "Default", "x-ca-allowed-extensions": [ "icc" ] }, "DownsampleImages": { "type": "boolean", "description": "Reduces images above resolution to save file size.", "default": false, "x-ca-featured": false, "x-ca-label": "Downsample images", "x-ca-group": "PDF Output", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "Resolution": { "maximum": 800, "minimum": 10, "type": "integer", "description": "Target resolution (PPI) used for rasterization tasks such as bleed fabrication and image downsampling.", "default": 300, "x-ca-featured": false, "x-ca-label": "Resolution", "x-ca-group": "PDF Output", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "800" } }, "PageRange": { "type": "string", "description": "Set page range to convert. The parameter understands digits and keywords such as even, odd, and last (for example: 1,2,5-last). Regardless of the range specified, a maximum of 100 pages will be processed per conversion.", "default": "1-last", "x-ca-featured": false, "x-ca-label": "Page Range", "x-ca-group": "PDF Output", "x-ca-type": "String", "x-ca-representation": "Default" } } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "ConversionCost": { "type": "integer", "description": "This amount will be deducted from your balance after the conversion.", "format": "int32", "example": 1 }, "Files": { "type": "array", "items": { "type": "object", "properties": { "FileName": { "type": "string", "description": "Name of the converted file.", "example": "myfile.pdf" }, "FileExt": { "type": "string", "description": "File type (file name extension)", "example": "pdf" }, "FileSize": { "type": "integer", "description": "File size", "format": "int32", "example": 111955 }, "FileId": { "type": "string", "description": "File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "Url": { "type": "string", "description": "File URL", "example": "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf" }, "FileData": { "type": "string", "description": "Base64 encoded file data", "format": "base64", "example": "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n..." } } } } }, "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationjson-1" } } }, "multipart/mixed": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#multipartmixed" } }, "example": "--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f\nConversionCost: 1\nContent-Type: application/octet-stream\nContent-Disposition: attachment; filename=\"my_file.pdf\"; size=8475\n\n--FILE CONTENT--\n--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f--\n" }, "application/octet-stream": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationoctet-stream-1" } } } } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "415": { "$ref": "#/components/responses/415" }, "500": { "$ref": "#/components/responses/500" }, "503": { "$ref": "#/components/responses/503" } }, "security": [ { "secret": [ ] }, { "token": [ ] }, { "jwt": [ ] } ] }, "x-ca-overview": "The PDF Print Production API prepares PDFs for professional printing with precise control over page geometry, color, and output compliance. Enforce standard or custom trim sizes using multiple measurement units, define bleed on all sides, and generate bleed content using mirror image or pixel repeat modes. Add production marks such as trim marks, registration marks, tint bars, and optional slug text for job identification. Manage color spaces including RGB, sRGB, CMYK, and Gray, and embed industry-standard PDF Output Intents such as FOGRA, GRACoL, SWOP, and Japan Color for print consistency. Custom ICC profiles are supported when required. Optimize output by downsampling images, setting target resolution, and selecting precise page ranges, making the tool ideal for automated, print-ready PDF workflows at scale.", "x-ca-meta-title": "PDF Print Production API - Trim, Bleed & Print Marks", "x-ca-meta-description": "Convert PDFs to print production PDFs with trim and bleed, optional mirror or repeat bleed, crop and registration marks, tint bars, slug text, color space conversion, and image downsampling.", "x-ca-source-formats": "pdf", "x-ca-destination-formats": "pdf", "x-ca-tags": [ "pdf" ] } }, "components": { "schemas": { "fileId": { "maxLength": 32, "minLength": 32, "type": "string", "description": "Uploaded File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "error": { "type": "object", "properties": { "Code": { "type": "integer", "description": "Error message code", "format": "int32", "example": 4000 }, "Message": { "type": "string", "description": "Error message text", "example": "Parameter validation error." } }, "externalDocs": { "url": "https://www.convertapi.com/doc/response-codes" } } }, "responses": { "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "401": { "description": "Authentication error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "415": { "description": "File type error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "500": { "description": "Conversion failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "503": { "description": "Conversion rate limit error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } } }, "parameters": { "fileId": { "name": "fileId", "in": "path", "description": "File ID", "required": true, "schema": { "$ref": "#/components/schemas/fileId" } }, "src": { "name": "src", "in": "path", "description": "Source file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } }, "dst": { "name": "dst", "in": "path", "description": "Destination file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } } }, "headers": { "content-disposition": { "description": "File information ([docummentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition))", "schema": { "type": "string" } }, "file-name": { "description": "File name", "schema": { "type": "string" } }, "file-ext": { "description": "File name extension", "schema": { "type": "string" } }, "file-size": { "description": "File size", "schema": { "type": "integer" } } }, "securitySchemes": { "secret": { "type": "http", "description": "[Get `Secret`](https://www.convertapi.com/a/secret)", "scheme": "bearer" }, "token": { "type": "http", "description": "[Get `Token`](https://www.convertapi.com/a/api-tokens)", "scheme": "bearer" }, "jwt": { "type": "http", "description": "[Get `JWT`](https://www.convertapi.com/a/jwt-tokens)", "scheme": "bearer", "bearerFormat": "JWT" } } }, "tags": [ { "name": "Conversion", "description": "File Conversion API call", "externalDocs": { "description": "File Conversion related operations", "url": "https://www.convertapi.com/doc/content-types" } }, { "name": "File Server", "description": "ConvertAPI temporary file storage", "externalDocs": { "description": "File Server related operations", "url": "https://www.convertapi.com/doc/upload" } }, { "name": "User", "description": "API User", "externalDocs": { "description": "API User related operations", "url": "https://www.convertapi.com/doc/user" } } ], "externalDocs": { "description": "Find out more about ConvertAPI", "url": "https://www.convertapi.com/doc" } }