Convert to PDF/Image API
  1. PDF
Convert to PDF/Image API
  • Getting Started
  • PDF
    • Convert a web page URL to PDF
      POST
    • Convert HTML content to PDF
      POST
    • Convert a document to PDF
      POST
    • Compress a PDF file
      POST
    • Merge multiple PDF files into one
      POST
    • Split a PDF file
      POST
    • Convert PDF to images
      POST
    • Remove metadata from PDF
      POST
    • Convert PDF to DOCX
      POST
  • Image
    • Capture a web page as an image
      POST
    • Convert images to PDF
      POST
    • Compress image
      POST
  • Schemas
    • Schemas
      • ErrorResponse
      • PdfUrlRequest
      • PdfHtmlRequest
      • PdfDocRequest
      • PdfCompressRequest
      • PdfMergeRequest
      • PdfSplitRequest
      • ImageUrlRequest
      • PdfRemoveMetadataRequest
      • ImageToPdfRequest
      • PdfToDocRequest
      • PdfToImageRequest
      • ImageCompressRequest
  1. PDF

Convert a web page URL to PDF

POST
/v1/pdf/url
Converts a web page specified by URL to a PDF document

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Query Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/pdf
PDF file
🟠400Bad Request
🟠401Unauthorized
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.convert2pdfapi.com/v1/pdf/url?url' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://example.com",
    "fileName": "output",
    "paperFormat": "Letter",
    "orientation": "landscape",
    "mediaType": "screen",
    "scale": 1,
    "pageRanges": "",
    "height": "11in",
    "width": "8.5in",
    "marginTop": "string",
    "marginBottom": "string",
    "marginLeft": "string",
    "marginRight": "string",
    "printBackground": false
}'
Response Response Example
{
    "status": "error",
    "message": "Error message"
}
Modified at 2025-10-24 10:13:01
Previous
Getting Started
Next
Convert HTML content to PDF
Built with