PDF & Screenshot

Catalyst SmartBrowz offers you the PDF & Screenshot 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 as your input.

The smart_browz reference used here is the component instance that we created earlier.

PDF or Screenshot from template

result = smart_browz.generate_from_template( '153000000009001', # replace template id template_data={}, output_options ={ 'output_type' : 'pdf' }, 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' }, navigation_options={ 'timeout': '3000', 'wait_until': 'domcontentloaded' } )

Take a screenshot from HTML

result = smart_browz.take_screenshot('


', screenshot_options = { 'type': 'png' }, page_options = { 'device': 'iPhone 6' }, navigation_options = { 'timeout': '3000', 'wait_until': 'domcontentloaded' })

Generate PDF

result = smart_browz.convert_to_pdf('https://catalyst.zoho.com/', page_options = {}, pdf_options = { "format": "A1", "landscape": True }, navigation_options = { 'timeout': '3000', 'wait_until': 'domcontentloaded' })

In the PDF & Screenshot section of the console, you can directly test this component using the Playground feature, and you can also copy the SDK 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.

Last Updated 2024-01-31 12:43:52 +0530 +0530



PDF & Screenshot - API