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.
Get SmartBrowz Instance
copyimport zcatalyst-sdk app = zcatalyst-sdk.initialize() smart_browz = app.smart_browz()
PDF or Screenshot from template
copyresult = 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
copyoutput_pdf = smart_browz.convert_to_pdf(source='YOUR_HTML_CODE')
Take a screenshot from URL
copyoutput_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
copyresult = smart_browz.take_screenshot('
Welcome
', screenshot_options = { 'type': 'png' }, page_options = { 'device': 'iPhone 6' }, navigation_options = { 'timeout': '3000', 'wait_until': 'domcontentloaded' })
Generate PDF
copyresult = 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.
Last Updated 2023-10-25 16:49:45 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit