Convierte cualquier cadena HTML o URL de página web en vivo en un PDF perfecto en píxeles utilizando un motor Chromium sin cabeza real Soporte completo de CSS moderno (flexbox, cuadrícula, fuentes web, gráficos de fondo) tamaños de página personalizados (A4, Carta, Legal y más) márgenes ajustables orientación horizontal y escalado Devuelve una URL de PDF descargable Listo para producción rápido y confiable para facturas informes boletos contratos y cualquier flujo de trabajo de automatización de documentos
{"success":true,"url":"https://pub-6db99bab215e44889f46c4b2a619f8c5.r2.dev/html_to_pdf/20260619/79d194ed-dfd7-42a0-8d27-51c71eec225b.pdf","source":"html","page_format":"A4","output_bytes":13372,"processing_time":"1484ms"}
curl --location --request POST 'https://zylalabs.com/api/12962/html+and+url+to+pdf+converter+api/25879/convert+html+or+url+to+pdf' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"html": "Invoice 1024
Amount due: $499.00
",
"page_format": "A4"
}'
Después de registrarte, a cada desarrollador se le asigna una clave de acceso a la API personal, una combinación única de letras y dígitos proporcionada para acceder a nuestro endpoint de la API. Para autenticarte con el Convertidor de HTML y URL a PDF API simplemente incluye tu token de portador en el encabezado de Autorización.
| Encabezado | Descripción |
|---|---|
Autorización
|
Requerido
Debería ser Bearer access_key. Consulta "Tu Clave de Acceso a la API" arriba cuando estés suscrito.
|
Sin compromiso a largo plazo. Mejora, reduce o cancela en cualquier momento. La Prueba Gratuita incluye hasta 50 solicitudes.
(Ahorra 2 meses pagando anualmente 🎉)
The endpoint returns a structured JSON response containing a success status, a secure URL to the generated PDF, the source of the content (HTML or URL), the page format used, the size of the output in bytes, and the processing time taken for the conversion.
The key fields in the response data include "success" (boolean), "url" (string), "source" (string), "page_format" (string), "output_bytes" (integer), and "processing_time" (string). These fields provide essential information about the conversion result.
Users can customize their requests by specifying parameters such as the HTML string or URL to convert, page format (e.g., A4, Letter), margins, orientation (landscape or portrait), and scaling options. These parameters allow for tailored PDF generation.
Los datos de respuesta están organizados en un formato JSON con pares de clave-valor que representan el resultado de la conversión Esta estructura permite a los usuarios acceder fácilmente a información específica como la URL del PDF y los detalles del procesamiento para su uso posterior en aplicaciones
Typical use cases include generating invoices, reports, tickets, contracts, and receipts from HTML content or URLs. It is also useful for archiving web content, creating certificates, and automating document generation workflows in various applications.
Users can utilize the returned data by accessing the "url" field to download the generated PDF. The "processing_time" can help assess performance, while the "output_bytes" field indicates the file size, which can be useful for storage considerations.
La precisión de los datos se mantiene a través del uso de un motor Chromium sin cabeza real que renderiza el contenido HTML o URL tal como aparecería en un navegador web moderno Esto asegura que el PDF generado coincida estrechamente con la apariencia del contenido original
Standard data patterns include a "success" field indicating whether the conversion was successful, a valid "url" for the PDF, and consistent values for "page_format" and "output_bytes." Users can expect these patterns for reliable integration into their applications.