--- title: "PDF \u0026 Screenshot" url: https://docs.catalyst.zoho.com/en/sdk/python/v1/smartbrowz/generate-pdfnscreenshot/ description: "This page describes the method to generate PDF and Screenshot" last_updated: 2025-12-16T05:01:39Z service: SmartBrowz type: general related_links: - name: "PDF \u0026 Screenshot - API" url: /en/api/code-reference/smartbrowz/generate-pdfnscreenshoturl/#PDF%26ScreenshotwithHTML%2fURLasInput - name: "SDK Scopes" url: /en/sdk/python/v1/sdk-scopes --- # PDF & Screenshot Catalyst SmartBrowz offers you the [PDF & Screenshot](https://docs.catalyst.zoho.com/en/smartbrowz/help/pdfnscreenshot/introduction/) component to generate your prefered visual docuemnts through code. You can incorporate this functionality in your application by copying the code below and pasting it in your application logic. Using the SDK below, you can generate visual documents by using HTML, URL or [Templates](https://docs.catalyst.zoho.com/en/smartbrowz/help/templates/create-templates/) as your input. To know more about the component instance `smart_browz` used below, please refer to [this help section](https://docs.catalyst.zoho.com/en/sdk/python/v1/smartbrowz/create-smartbrowz-instance/). # Generate PDF or Screenshot from template ```python smart_browz = app.smart_browz() result = smart_browz.generate_from_template( "153000000009001", # Replace template id 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"}, ) ``` # Convert to PDF from 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"}, ) ``` # Generate PDF from 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"}, ) ``` # Take a screenshot from 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" } } }) ``` # Take a screenshot from 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" } } }) ``` In the PDF & Screenshot section of the console, you can directly test this component using the [Playground feature](https://docs.catalyst.zoho.com/en/smartbrowz/help/pdfnscreenshot/implementation/#generating-pdf--screenshots-through-playground), and you can also [copy the SDK](https://docs.catalyst.zoho.com/en/smartbrowz/help/pdfnscreenshot/implementation/#generating-pdf--screenshots-through-code) directly from the console. > **Note:** Any Browser action or operation that you code using the Browser Logic function, or any browser automation or web scraping task that you perform using any component of **Catalyst SmartBrowz** is at your own risk. We strongly recommend you use the SmartBrowz components to perform operations on domains that permit the actions, or with proper approval. Additionally, while Catalyst does provide a secure infrastructure to code your functions, any consequence of the logic you code using Catalyst functions is yours alone. > **Info :** Refer to the [SDK Scopes table](https://docs.catalyst.zoho.com/en/sdk/python/v1/sdk-scopes) to determine the required permission level for performing the above operation.