1. Image Recognition
API Documents - GuGuData | Production-Ready APIs Built for Developers
  • GuGuData API documents
  • Metadata
    • DEMO
      • [DEMO] Global QS World University Rankings
      • [DEMO] Global QS World University Rankings
      • [DEMO] Global University
      • [DEMO] Chinese Poem
      • [DEMO] Stock US Symbols
      • [DEMO] Stock HK Symbols
      • [DEMO] US College Institutions Data API
      • [DEMO] US College Programs Data API
      • [DEMO] US CIP Codes
    • Global QS World University Rankings
      GET
    • Global QS World University Rankings
      GET
    • Global University
      GET
    • Chinese Poem
      GET
    • Stock US Symbols
      GET
    • Stock HK Symbols
      GET
    • US College Institutions Search
      GET
    • US College Institution Detail
      GET
    • US College Programs Search
      GET
    • US College Institution Programs
      GET
    • US CIP Codes Search
      GET
  • Website Tools
    • DEMO
      • [DEMO] Short Link API
      • [DEMO] Webpage Readable Content Extraction
      • [DEMO] Domain SSL Certificate Information Parsing
      • [DEMO] Domain DNS Information Query
      • [DEMO] Query Website Favicon and Title
      • [DEMO] Format International Phone
      • [DEMO] URL to static HTML
      • [DEMO] URL to Image
      • [DEMO] URL to Markdown
      • [DEMO] Get URL links
      • [DEMO] Website Snapshot
      • [DEMO] Domain Whois
      • [DEMO] IP Address
      • [DEMO] Article Extract
      • [DEMO] Geographic Coordinate System Converter
      • [DEMO] Extract Structured JSON from Webpage
    • Short Link API
      POST
    • Webpage Readable Content Extraction
      POST
    • Domain SSL Certificate Information Parsing
      GET
    • Domain DNS Information Query
      GET
    • Query Website Favicon and Title
      GET
    • Format International Phone
      GET
    • URL to static HTML
      POST
    • URL to Image
      GET
    • URL to Markdown
      POST
    • Get URL links
      GET
    • Website Snapshot
      POST
    • Domain Whois
      GET
    • IP Address
      GET
    • Article Extract
      POST
    • Geographic Coordinate System Converter
      GET
    • Extract Structured JSON from Webpage
      POST
  • Image Recognition
    • DEMO
      • [DEMO] Convert HTML to Word
      • [DEMO] Convert PPT to PDF
      • [DEMO] HTML to PDF
      • [DEMO] Image OCR
      • [DEMO] PDF to Format
      • [DEMO] PDF Splitting
      • [DEMO] Markdown to PDF
      • [DEMO] PPT to Images
      • [DEMO] PDF to HTML
      • [DEMO] PDF Summary
      • [DEMO] Image Compress
      • [DEMO] Word to HTML
    • Convert HTML to Word
      POST
    • Convert PPT to PDF
      POST
    • HTML to PDF
      POST
    • Image OCR
      POST
    • PDF to Format
      POST
    • PDF Splitting
      POST
    • Markdown to PDF
      POST
    • PPT to Images
      POST
    • PDF to HTML
      POST
    • PDF Summary
      POST
    • Image Compress
      POST
    • Word to HTML
      POST
  • QRcode and Barcode
    • DEMO
      • [DEMO] Decode QR Code from Image
      • [DEMO] QR Code
      • [DEMO] Wifi QR Code
      • [DEMO] Bar Code
    • Decode QR Code from Image
    • QR Code
    • Wifi QR Code
    • Bar Code
  • Text Tools
    • DEMO
      • [DEMO] Detect Text Language
      • [DEMO] ISBN Book Metadata Lookup
      • [DEMO] Simplified and Traditional Chinese Converter
      • [DEMO] Text Similarity Calculator
    • Detect Text Language
    • ISBN Book Metadata Lookup
    • Simplified and Traditional Chinese Converter
    • Text Similarity Calculator
  • healthcheck
    GET
  1. Image Recognition

HTML to PDF

POST
https://api.gugudata.io/v1/imagerecognition/html2pdf
Last modified:2026-05-22 14:54:43
HTML/URL to PDF
Render HTML or a target URL as PDF and return the generated PDF resource metadata defined by the current v1 contract.
Method: POST
Path: /v1/imagerecognition/html2pdf
Demo: https://api.gugudata.io/v1/imagerecognition/html2pdf/demo
OpenAPI: https://gugudata.io/assets/openapi/gugudata.openapi.3.1.json
Request Parameters:
appkey (string, required): Application key used for request authentication. Supply the value as a query parameter, form field, or multipart field according to the request content type.
type (string, required): Endpoint-specific type selector. Refer to the endpoint description for supported values.
content (string, required): Primary text content processed by the endpoint.
landscape (integer, optional): Whether the generated PDF should use landscape orientation.
Response Fields:
DataStatus.StatusCode (integer, required): Application-level status code returned by the current v1 contract.
DataStatus.StatusDescription (string, required): Application-level status message returned by the current v1 contract.
DataStatus.ResponseDateTime (string, required): Response timestamp returned by the current service contract.
DataStatus.DataTotalCount (integer, required): Total number of records that match the request.
Data (string, required): Primary response payload returned by the endpoint.
HTTP Status Codes:
200: Request processed successfully. Some endpoints expose a separate application-level status field in the response body, such as dataStatus.statusCode.
400: Invalid request parameters or request format. Check required fields, data types, and request body format.
401: Missing or unknown application key. Provide a valid appkey with the request.
403: The application key is recognized but access is not allowed. The key may be expired, inactive, or not permitted for the requested API.
429: Request rate or trial usage limit exceeded. Reduce concurrency or retry after the limit window resets.
500: Internal service error. Retry later or contact support if the error persists.
503: Upstream service unavailable. Retry later; the requested upstream dependency is temporarily unavailable.
Business Status Codes:
100 Normal return: No additional remark.
101 Parameter error: No additional remark.
102 Request frequency limited: Cannot exceed 100 requests per second
103 Account overdue: No additional remark.
104 Incorrect APPKEY: Please check if the passed APPKEY is the value obtained from the developer center
110 Interface response error: No additional remark.
Key Features:
Superior performance conversion efficiency.
Supports converting passed HTML to PDF, supports converting CSS format in HTML.
Supports passing website URL, directly converting page to corresponding PDF file.
The converted PDF provides a permanent storage file address.
Full interface supports HTTPS (TLS v1.0 / v1.1 / v1.2 / v1.3).
Fully compatible with Apple ATS.
National multi-node CDN deployment.
Interface response is extremely fast, and multiple servers build API interface load balancing.
Details:
https://gugudata.io/details/html2pdf

Request

Query Params

Header Params

Body Params application/json

Example
{
    "type": "html",
    "content": "https://www.gugudata.io",
    "landscape": 0
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff 'https://api.gugudata.io/v1/imagerecognition/html2pdf?appkey=sk-******' \
--header 'Content-Type: application/json' \
--data '{
    "type": "html",
    "content": "https://www.gugudata.io",
    "landscape": 0
}'

Responses

🟢200成功
application/json
Bodyapplication/json

Example
{
  "Data": "string",
  "DataStatus": {
    "StatusCode": 0,
    "StatusDescription": "string",
    "ResponseDateTime": "string",
    "DataTotalCount": 0
  }
}
Modified at 2026-05-22 14:54:43
Previous
Convert PPT to PDF
Next
Image OCR
Built with