---
title: "PDF y captura de pantalla"
url: https://docs.catalyst.zoho.com/es/sdk/python/v1/smartbrowz/generate-pdfnscreenshot/
description: "Esta página describe el método para generar PDF y capturas de pantalla"
last_updated: 2026-03-30T08:10:30Z
service: SmartBrowz
type: general
related_links:
- name: "PDF \u0026 Screenshot - API"
url: /es/api/code-reference/smartbrowz/generate-pdfnscreenshoturl/#PDF%26ScreenshotwithHTML%2fURLasInput
- name: "SDK Scopes"
url: /es/sdk/python/v1/sdk-scopes
---
# PDF & Screenshot
Catalyst SmartBrowz te ofrece el componente [PDF & Screenshot](https://docs.catalyst.zoho.com/es/smartbrowz/help/pdfnscreenshot/introduction/) para generar tus documentos visuales preferidos a través de código. Puedes incorporar esta funcionalidad en tu aplicación copiando el código a continuación y pegándolo en la lógica de tu aplicación.
Utilizando el SDK a continuación, puedes generar documentos visuales usando HTML, URL o [Templates](https://docs.catalyst.zoho.com/es/smartbrowz/help/templates/create-templates/) como tu entrada.
Para conocer más sobre la instancia de componente `smart_browz` utilizada a continuación, consulta [esta sección de ayuda](https://docs.catalyst.zoho.com/es/sdk/python/v1/smartbrowz/create-smartbrowz-instance/).
# Generar PDF o captura de pantalla desde plantilla
```python
smart_browz = app.smart_browz()
result = smart_browz.generate_from_template(
"153000000009001", # Reemplazar el ID de plantilla
template_data={},
output_options={"output_type": "pdf"},
pdf_options={
"scale": 1,
"display_header_footer": true,
"print_background": false,
"landscape": false,
"page_ranges": "1",
"format": "A4",
"width": "100",
"height": "100",
"omit_background": false,
"password": "Demo$",
},
page_options={
"css": {"content": "body{background: lightgrey}"},
"viewport": {"width": 1440, "height": 900},
"javascript_enabled": true,
},
navigation_options={"timeout": 5000, "wait_until": "networkidle0"},
)
```
# Convertir a PDF desde HTML
```python
smart_browz = app.smart_browz()
result = smart_browz.convert_to_pdf(
"
Welcome
",
pdf_options={
"scale": 1,
"display_header_footer": true,
"print_background": false,
"landscape": false,
"page_ranges": "1",
"format": "A4",
"width": "100",
"height": "100",
"omit_background": false,
"password": "Demo$",
},
page_options={
"css": {"content": "body{background: lightgrey}"},
"viewport": {"width": 1440, "height": 900},
"javascript_enabled": true,
},
navigation_options={"timeout": 5000, "wait_until": "networkidle0"},
)
```
# Generar PDF desde URL
```python
smart_browz = app.smart_browz()
result = smart_browz.convert_to_pdf(
"https://catalyst.zoho.com/",
pdf_options={
"scale": 1,
"display_header_footer": true,
"print_background": false,
"landscape": false,
"page_ranges": "1",
"format": "A4",
"width": "100",
"height": "100",
"omit_background": false,
"password": "Demo$",
},
page_options={
"css": {"content": "body{background: lightgrey}"},
"viewport": {"width": 1440, "height": 900},
"javascript_enabled": true,
},
navigation_options={"timeout": 5000, "wait_until": "networkidle0"},
)
```
# Tomar una captura de pantalla desde HTML
```python
smart_browz = app.smart_browz()
output_screenshot = smart_browz.take_screenshot(
source='Welcome
',
"output_options": {
"output_type": "screenshot"
},
screenshot_options= {
"type": "jpeg",
"quality": 100,
"full_page": false,
"omit_background": false,
"capture_beyond_viewport": true,
"clip": {
"x": 50,
"y": 100,
"width": 1000,
"height": 100
}
},
page_options= {
"css": {
"content": "body{background: lightgrey}"
},
"viewport": {
"width": 1440,
"height": 900
"viewport": {
"width": 1440,
"height": 900
},
"javascript_enabled": true
"javascript_enabled": true
},
navigation_options= {
"timeout": 5000,
"wait_until": "networkidle0"
"navigation_options": {
"timeout": 5000,
"wait_until": "networkidle0"
}
}
})
```
# Tomar una captura de pantalla desde URL
```python
smart_browz = app.smart_browz()
output_screenshot = smart_browz.take_screenshot(
source='YOUR_URL',
"output_options": {
"output_type": "screenshot"
},
screenshot_options= {
"type": "jpeg",
"quality": 100,
"full_page": false,
"omit_background": false,
"capture_beyond_viewport": true,
"clip": {
"x": 50,
"y": 100,
"width": 1000,
"height": 100
}
},
page_options= {
"css": {
"content": "body{background: lightgrey}"
},
"viewport": {
"width": 1440,
"height": 900
"viewport": {
"width": 1440,
"height": 900
},
"javascript_enabled": true
"javascript_enabled": true
},
navigation_options= {
"timeout": 5000,
"wait_until": "networkidle0"
"navigation_options": {
"timeout": 5000,
"wait_until": "networkidle0"
}
}
})
```
En la sección de PDF & Screenshot de la consola, puedes probar directamente este componente usando la [funcionalidad Playground](https://docs.catalyst.zoho.com/es/smartbrowz/help/pdfnscreenshot/implementation/#generating-pdf--screenshots-through-playground), y también puedes [copiar el SDK](https://docs.catalyst.zoho.com/es/smartbrowz/help/pdfnscreenshot/implementation/#generating-pdf--screenshots-through-code) directamente desde la consola.
> **Note:** Cualquier acción u operación del navegador que codifiques utilizando la función Browser Logic, o cualquier tarea de automatización del navegador o web scraping que realices utilizando cualquier componente de **Catalyst SmartBrowz** es bajo tu propio riesgo. Te recomendamos encarecidamente que utilices los componentes de SmartBrowz para realizar operaciones en dominios que permitan las acciones, o con la aprobación adecuada. Además, aunque Catalyst proporciona una infraestructura segura para codificar tus funciones, cualquier consecuencia de la lógica que codifiques utilizando las funciones de Catalyst es únicamente tuya.
> **Info :** Consulta la [tabla de SDK Scopes](https://docs.catalyst.zoho.com/es/sdk/python/v1/sdk-scopes) para determinar el nivel de permiso requerido para realizar la operación anterior.