--- title: "Implementation" url: https://docs.catalyst.zoho.com/en/smartbrowz/help/pdfnscreenshot/implementation/ description: "Take PDFs and screenshots of web pages or documents programmatically or in the console, based on an input format type of your preference." last_updated: 2026-08-17T12:16:04Z service: SmartBrowz type: general --- # Implementation Navigate to the *PDF & Screenshot* component present in the **SmartBrowz** section in your Catalyst console. PDF & Screenshot enables you to generate visual documents of any webpage. You can use this component in two ways: - **Using SDKs** ![catalyst_smartbrowz_pdfnscreen_code_snippets](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_code_snippets.webp) - **Using the Playground feature** ![catalyst_smartbrowz_pdfnscreen_playground_show](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_playground_show.webp) ### Generate PDF & Screenshots Through Code Catalyst provides you the required SDKs to generate PDF & Screenshots in the following frameworks: * [Java SDK](https://docs.catalyst.zoho.com/en/sdk/java/v1/smartbrowz/generate-pdfnscreenshot/) * [NodeJS SDK](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/smartbrowz/generate-pdfnscreenshot/) * [Python SDK](https://docs.catalyst.zoho.com/en/sdk/python/v1/smartbrowz/generate-pdfnscreenshot/) You can also use this [Catalyst API](https://docs.catalyst.zoho.com/en/api/code-reference/smartbrowz/generate-pdfnscreenshoturl/#PDF%26ScreenshotwithHTML%2fURLasInput) to generate visual documents in your preferred format. Based on your preferred programming language, you can copy and paste the below code snippets in your application logic to generate visual documents: ### Java SDK **Java SDK to Generate Visual Documents** ```java // initialize SmartBrowz ZCSmartBrowz smartBrowz = ZCSmartBrowz.getInstance(); // generate output from a predefined template ZCSmartBrowzConvertDetails convertDetailsForTemplateConversion = ZCSmartBrowzConvertDetails.getInstance(); convertDetailsForTemplateConversion.setTemplateId(YOUR_TEMPLATE_ID); smartBrowz.generateFromTemplate(convertDetailsForTemplateConversion); // convert to PDF from HTML ZCSmartBrowzConvertDetails convertDetailsForPDF = ZCSmartBrowzConvertDetails.getInstance(); convertDetailsForPDF.setHtml("YOUR_HTML_CODE"); smartBrowz.takeScreenshot(convertDetailsForPDF); // take a screenshot from URL ZCSmartBrowzConvertDetails convertDetailsForScreenshot = ZCSmartBrowzConvertDetails.getInstance(); convertDetailsForScreenshot.setUrl("YOUR_URL"); smartBrowz.convertToPdf(convertDetailsForScreenshot); ``` > **Note:** This code snippet contains the individual logic to accept any of acceptable input and generate PDF and Screenshot. When you copy the snippet, ensure you retain the lines of code that are pertinent to your requirement and omit the rest. ### Node.js SDK **Node.js SDK to Generate Visual Documents** ```javascript const smartbrowz = app.smartbrowz(); // Generate output from template smartbrowz.generateFromTemplate("YOUR_TEMPLATE_ID", {"template_data": YOUR_TEMPLATE_DATA} ) .then((data)=>{ // On Success }).catch((err)=>{ // On Error }) // Convert PDF from HTML smartbrowz.convertToPdf("YOUR_HTML_CODE", { "pdf_options": {}, "page_options": {} }).then((data)=>{ // On Success }).catch((err)=>{ // On Error }); // Capture a Screenshot from URL smartbrowz.takeScreenshot("YOUR_URL", { "screenshot_options": { "type": "jpeg" //Provide either jpg or png }, "page_options": { "device": "iPad" //Provide a device of your prefrence } }).then((data)=>{ // On Success }).catch((err)=>{ // On Error }) ``` > **Note:** This code snippet contains the individual logic to accept any of acceptable input and generate PDF and Screenshot. When you copy the snippet, ensure you retain the lines of code that are pertinent to your requirement and omit the rest. ### Python SDK **Python SDK to Generate Visual Documents** ```python # initialize smartbrowz instance smart_browz = app.smart_browz() # generate output from a predefined template output_template = smart_browz.generate_output_from_template( template_id='YOUR_TEMPLATE_ID', template_data={}, output_type='pdf', // You can determine the format of your visual document here pdf_options={}, navigation_options={} ) # convert to PDF from HTML output_pdf = smart_browz.convert_to_pdf(source='YOUR_HTML_CODE') # take a screenshot from URL output_screenshot = smart_browz.take_screenshot( source='YOUR_URL', screenshot_options={ 'quality': '100' }, page_options={ 'device': 'iphone 13 pro' //Provide a device of your prefrence }, navigation_options={ 'timeout': '3000', 'wait_until': 'domcontentloaded' } ) ``` > **Note:** This code snippet contains the individual logic to accept any of acceptable input and generate PDF and Screenshot. When you copy the snippet, ensure you retain the lines of code that are pertinent to your requirement and omit the rest. These code snippets are available under the **SDK Code Snippets** section of the PDF & Screenshot component in the console. You can copy the code of the stack you require and incorporate it in your business logic. ![catalyst_smartbrowz_pdfnscreen_snippet_selection_py](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_snippet_selection_py.webp) You can also use this [API](https://docs.catalyst.zoho.com/en/api/code-reference/smartbrowz/generate-pdfnscreenshoturl/#PDF%26ScreenshotwithHTML%2fURLasInput) to generate PDF & Screenshots. You can execute this API directly after [authenticating your request](https://docs.catalyst.zoho.com/en/api/oauth2/overview-and-terminology/#OverviewandTerminology). > **Note:** These code snippets are also available in the respective framework's [SDK documentation](https://docs.catalyst.zoho.com/en/getting-started/catalyst-sdk/). ### Generate PDF & Screenshots Through Playground Playground is available in the console for you to generate visual documents immediately or test this feature before incorporating it into your logic. The Playground itself comes loaded with pre-engineered inputs for you to test the functionality of the component. You can generate visual documents of webpages in the console by providing the input in three different ways: **HTML Code** ### HTML Code 1. Select the **HTML Code** option in the *Select Input Type* section. ![catalyst_smartbrowz_pdfnscreen_html_main_view](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_html_main_view.webp) You can either customize the code present in the HTML code editor or paste your own code. 2. Select the required format from the *Select Output Format* drop-down. ![catalyst_smartbrowz_pdfnscreen_html_output_drop](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_html_output_drop.webp) 3. This is an optional step, but you can customize your visual document by applying custom styling elements and layout and other aesthetic configurations using the options present in the **Show Advanced Styling Options** section. ![catalyst_smartbrowz_pdfnscreen_html_advanced_options](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_html_advanced_options.webp) You can also use this section to password protect the generated visual document by setting up a password in the **Set Password** section. 4. Click **Generate**. ![catalyst_smartbrowz_pdfnscreen_generated_output](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_generated_output.webp) A preview of the visual document you generated will be shown in a pop-up. Click **Download**, to save the document in your local system. If you have password protected your PDF, then the preview and download options will only be made active after you enter the password. ![catalyst_smartbrowz_pdfnscreen_pwd_protected](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_pwd_protected.webp) **URL** ### URL You can generate a visual document of a webpage of your preference by directly entering its URL. 1. Click the **URL** button to use URL as the input type. 2. Enter the required URL in the *Enter Web Page URL* input field. ![catalyst_smartbrowz_pdfnscreen_url_select](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_url_select.webp) 3. Select the required format from the *Select Output Format* drop-down. ![catalyst_smartbrowz_pdfnscreen_url_output_drop](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_url_output_drop.webp) 4. This is an optional step, but you can customize your visual document by applying custom styling elements and layout and other aesthetic configurations using the options present in the **Show Advanced Styling Options** section. ![catalyst_smartbrowz_pdfnscreen_url_styling](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_url_styling.webp) You can also use this section to password protect the generated visual document by setting up a password in the **Set Password** section. 5. Click **Generate**. ![catalyst_smartbrowz_pdfnscreen_generated_url_output](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_generated_url_output.webp) If you have password protected your PDF, then the preview and download options will only be made active after you enter the password. ![catalyst_smartbrowz_pdfnscreen_pwd_protected](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_pwd_protected.webp) **Templates** ### Templates > **Note:** Note: You can only this feature if you have previously created and saved template using the [Templates](https://docs.catalyst.zoho.com/en/smartbrowz/help/templates/introduction/) component. 1. Click the **Template** button to set templates as the input type. 2. Select your preferred template from the *Template* drop-down. ![catalyst_smartbrowz_pdfnscreen_template_select_layout](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_template_select_layout.webp) 3. You can provide the data for the visual document as a JSON input through the editor present in this section. ![catalyst_smartbrowz_pdfnscreen_template_json_input](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_template_json_input.webp) 4. Click **Generate**. ![catalyst_smartbrowz_pdfnscreen_generated_output](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_generated_output.webp) A preview of the visual document you generated will be shown in a pop-up. Click **Download**, to save the document in your local system. > **Note:** * Prior to generating a visual document, since your input type is *Templates* you would have chosen the layout, the styling elements and all the other aesthetic features of the visual document, while you were creating and designing the template. You can find out how to customize a template from this [section](https://docs.catalyst.zoho.com/en/smartbrowz/help/templates/customize-templates/). * Because you are using *Templates* to generate your password protected PDF, you have an option to code a logic that allows you to set the password dynamically. You can find out more about this feature in this [section](https://docs.catalyst.zoho.com/en/smartbrowz/help/templates/customize-templates/#password-protected-pdfs). If you have password protected your document, then the preview and download options will only be made active after you enter the password. ![catalyst_smartbrowz_pdfnscreen_pwd_protected](https://catalyst-docs-development.zohostratus.in/images/help/smartbrowz/catalyst_smartbrowz_pdfnscreen_pwd_protected.webp) > **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.