SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Presented By: Muskan Gupta
Export PDF with
Puppeteer
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session timings, you
are requested not to join sessions
after a 5 minutes threshold post
the session start time.
Feedback
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Silent Mode
Keep yourself muted until and
unless you have any query.
Our Agenda
1. Node.js
2. Node modules
3. NPM(Node Package Manager)
4. HandleBars
5. Introduction to Puppeteer
6. Demo
7. Problems with Puppeteer and their Solution
Node.js
● Node.js is an open source server environment.
● Node.js runs on various platforms (Windows, Linux, Unix, Mac OS, etc.).
● Node.js uses JavaScript on the server.
● Node.js is asynchronous.
● Node.js is single-threaded and highly scalable.
Node Module
● Node module is a functionality organized in single or multiple JavaScript files which
can be reused throughout the Node.js application.
● Each module in Node.js has its own context.
NPM(Node Package Manager)
● NPM is a repository where we have a large
number of node modules available.
● It is also a command line utility, to install these
node modules.
● For installing : npm install module_name
HandleBars
● HandleBars is a node module which is used to create html templates.
● It uses a template and a data object to generate HTML page.
● To install : npm install handlebars
● For example :
Input
Template HTML
Introduction to Puppeteer
According to the documentation :
Puppeteer is a Node library which provides a high-level API to control Chrome or
Chromium over the DevTools Protocol. Puppeteer runs headless by default, but
can be configured to run full (non-headless) Chrome or Chromium.
Usage of Puppeteer
● Generate screenshots and PDFs of pages.
● Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e.
"SSR" (Server-Side Rendering)).
● Automate form submission, UI testing, keyboard input, etc.
● Create an up-to-date, automated testing environment. Run your tests directly in the
latest version of Chrome using the latest JavaScript and browser features.
● Test Chrome Extensions.
Generate PDF with Puppeteer
Demo
Problems with Puppeteer
and their Solution
● Loading of an image
Rather than directly passing the data, create an html page and goto that
page to create PDF.
● Problem with chromium available in puppeteer on EC2 instances
Install chromium on EC2 instance explicitly. Set chromium path to the
chromium installed. And now instead of puppeteer use puppeteer-core.
References
● puppeteer
● What is npm?.
● Node.js Modules.
● Node.js Introduction
● Introduction to HandleBars
Thank You !

Mais conteúdo relacionado

Mais procurados

Bac 2022- NSI journée 1
Bac 2022- NSI journée 1Bac 2022- NSI journée 1
Bac 2022- NSI journée 1LETUDIANT1
 
9 клас контрольна робота 1г (математика)
9 клас контрольна робота 1г (математика)9 клас контрольна робота 1г (математика)
9 клас контрольна робота 1г (математика)Andy Levkovich
 
звіт математика 2016
звіт математика 2016звіт математика 2016
звіт математика 2016metodist_selid
 
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vn
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vnTập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vn
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vnMegabook
 
ЗНО - Матекатика 2006 рік
ЗНО - Матекатика 2006 рікЗНО - Матекатика 2006 рік
ЗНО - Матекатика 2006 рікtcherkassova2104
 
Презентація до уроку : "Степенева функція. Графік та властивості"
Презентація до уроку : "Степенева функція. Графік та властивості"Презентація до уроку : "Степенева функція. Графік та властивості"
Презентація до уроку : "Степенева функція. Графік та властивості"yuraravlinko
 
арифметична і геометрична прогресії в літературі
арифметична і геометрична прогресії в літературіарифметична і геометрична прогресії в літературі
арифметична і геометрична прогресії в літературіValyu66
 
Bai tap-hinh-lop-7-hay-co-loi-giai
Bai tap-hinh-lop-7-hay-co-loi-giaiBai tap-hinh-lop-7-hay-co-loi-giai
Bai tap-hinh-lop-7-hay-co-loi-giaiSa Hong
 
Презентація:Множення і ділення раціональних чисел (повторення)
Презентація:Множення і ділення раціональних чисел (повторення)Презентація:Множення і ділення раціональних чисел (повторення)
Презентація:Множення і ділення раціональних чисел (повторення)sveta7940
 
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.Наташа Иванякова
 
алгебра підручник для 7 класу авт. мальований б. і. та ін.
алгебра   підручник для 7 класу  авт. мальований б. і. та ін.алгебра   підручник для 7 класу  авт. мальований б. і. та ін.
алгебра підручник для 7 класу авт. мальований б. і. та ін.Гергель Ольга
 
відповіді
відповідівідповіді
відповідіjkmuffgrhdcv
 
числові послідовності
числові послідовностічислові послідовності
числові послідовностіTetyana Andrikevych
 
Застосування інтеграла до обчислення площ геометричних фігур
Застосування інтеграла до обчислення площ геометричних фігурЗастосування інтеграла до обчислення площ геометричних фігур
Застосування інтеграла до обчислення площ геометричних фігурСветлана Олейник
 
розвязування трикутників 9 клас
розвязування трикутників 9 класрозвязування трикутників 9 клас
розвязування трикутників 9 класОльга Костенко
 

Mais procurados (20)

Bac 2022- NSI journée 1
Bac 2022- NSI journée 1Bac 2022- NSI journée 1
Bac 2022- NSI journée 1
 
9 клас контрольна робота 1г (математика)
9 клас контрольна робота 1г (математика)9 клас контрольна робота 1г (математика)
9 клас контрольна робота 1г (математика)
 
звіт математика 2016
звіт математика 2016звіт математика 2016
звіт математика 2016
 
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vn
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vnTập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vn
Tập 2 chuyên đề Toán học: Phương trình vô tỷ - Megabook.vn
 
ЗНО - Матекатика 2006 рік
ЗНО - Матекатика 2006 рікЗНО - Матекатика 2006 рік
ЗНО - Матекатика 2006 рік
 
Презентація до уроку : "Степенева функція. Графік та властивості"
Презентація до уроку : "Степенева функція. Графік та властивості"Презентація до уроку : "Степенева функція. Графік та властивості"
Презентація до уроку : "Степенева функція. Графік та властивості"
 
23 створення діаграм
23 створення діаграм23 створення діаграм
23 створення діаграм
 
арифметична і геометрична прогресії в літературі
арифметична і геометрична прогресії в літературіарифметична і геометрична прогресії в літературі
арифметична і геометрична прогресії в літературі
 
Bai tap-hinh-lop-7-hay-co-loi-giai
Bai tap-hinh-lop-7-hay-co-loi-giaiBai tap-hinh-lop-7-hay-co-loi-giai
Bai tap-hinh-lop-7-hay-co-loi-giai
 
Презентація:Множення і ділення раціональних чисел (повторення)
Презентація:Множення і ділення раціональних чисел (повторення)Презентація:Множення і ділення раціональних чисел (повторення)
Презентація:Множення і ділення раціональних чисел (повторення)
 
Metodichka
MetodichkaMetodichka
Metodichka
 
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.
розвязування задач і вправ з теми вписані і описані чотирикутники,8кл.
 
Repérage Classe EB7
Repérage Classe EB7Repérage Classe EB7
Repérage Classe EB7
 
алгебра підручник для 7 класу авт. мальований б. і. та ін.
алгебра   підручник для 7 класу  авт. мальований б. і. та ін.алгебра   підручник для 7 класу  авт. мальований б. і. та ін.
алгебра підручник для 7 класу авт. мальований б. і. та ін.
 
відповіді
відповідівідповіді
відповіді
 
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
 
Довідник
ДовідникДовідник
Довідник
 
числові послідовності
числові послідовностічислові послідовності
числові послідовності
 
Застосування інтеграла до обчислення площ геометричних фігур
Застосування інтеграла до обчислення площ геометричних фігурЗастосування інтеграла до обчислення площ геометричних фігур
Застосування інтеграла до обчислення площ геометричних фігур
 
розвязування трикутників 9 клас
розвязування трикутників 9 класрозвязування трикутників 9 клас
розвязування трикутників 9 клас
 

Semelhante a Export pdf with puppeteer

Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Sam Becker
 
De-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environmentDe-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environmentSam Bashton
 
De-centralise and Conquer: Masterless Puppet in a Dynamic Environment
De-centralise and Conquer: Masterless Puppet in a Dynamic EnvironmentDe-centralise and Conquer: Masterless Puppet in a Dynamic Environment
De-centralise and Conquer: Masterless Puppet in a Dynamic EnvironmentPuppet
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIubunturk
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingStanislav Osipov
 
Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Jérôme Petazzoni
 
Why Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightKnoldus Inc.
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for startersBruce Li
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betadigitalzombie
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with RustKnoldus Inc.
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesBethmi Gunasekara
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureTroy Miles
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional ProgrammerDave Cross
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureYury Tsarev
 

Semelhante a Export pdf with puppeteer (20)

Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
De-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environmentDe-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environment
 
De-centralise and Conquer: Masterless Puppet in a Dynamic Environment
De-centralise and Conquer: Masterless Puppet in a Dynamic EnvironmentDe-centralise and Conquer: Masterless Puppet in a Dynamic Environment
De-centralise and Conquer: Masterless Puppet in a Dynamic Environment
 
Nodejs
NodejsNodejs
Nodejs
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014
 
Why Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's Playwright
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 beta
 
OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with Rust
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Automated deployment
Automated deploymentAutomated deployment
Automated deployment
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
 

Mais de Knoldus Inc.

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxKnoldus Inc.
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxKnoldus Inc.
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxKnoldus Inc.
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxKnoldus Inc.
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationKnoldus Inc.
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationKnoldus Inc.
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II PresentationKnoldus Inc.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAKnoldus Inc.
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Knoldus Inc.
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxKnoldus Inc.
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinKnoldus Inc.
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks PresentationKnoldus Inc.
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Knoldus Inc.
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxKnoldus Inc.
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance TestingKnoldus Inc.
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxKnoldus Inc.
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationKnoldus Inc.
 
CQRS with dot net services presentation.
CQRS with dot net services presentation.CQRS with dot net services presentation.
CQRS with dot net services presentation.Knoldus Inc.
 

Mais de Knoldus Inc. (20)

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptx
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and Kotlin
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks Presentation
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptx
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance Testing
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptx
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower Presentation
 
CQRS with dot net services presentation.
CQRS with dot net services presentation.CQRS with dot net services presentation.
CQRS with dot net services presentation.
 

Último

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Export pdf with puppeteer

  • 1. Presented By: Muskan Gupta Export PDF with Puppeteer
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Respect Knolx session timings, you are requested not to join sessions after a 5 minutes threshold post the session start time. Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep yourself muted until and unless you have any query.
  • 3. Our Agenda 1. Node.js 2. Node modules 3. NPM(Node Package Manager) 4. HandleBars 5. Introduction to Puppeteer 6. Demo 7. Problems with Puppeteer and their Solution
  • 4. Node.js ● Node.js is an open source server environment. ● Node.js runs on various platforms (Windows, Linux, Unix, Mac OS, etc.). ● Node.js uses JavaScript on the server. ● Node.js is asynchronous. ● Node.js is single-threaded and highly scalable.
  • 5. Node Module ● Node module is a functionality organized in single or multiple JavaScript files which can be reused throughout the Node.js application. ● Each module in Node.js has its own context.
  • 6. NPM(Node Package Manager) ● NPM is a repository where we have a large number of node modules available. ● It is also a command line utility, to install these node modules. ● For installing : npm install module_name
  • 7. HandleBars ● HandleBars is a node module which is used to create html templates. ● It uses a template and a data object to generate HTML page. ● To install : npm install handlebars ● For example : Input Template HTML
  • 8. Introduction to Puppeteer According to the documentation : Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.
  • 9. Usage of Puppeteer ● Generate screenshots and PDFs of pages. ● Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)). ● Automate form submission, UI testing, keyboard input, etc. ● Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features. ● Test Chrome Extensions.
  • 10. Generate PDF with Puppeteer
  • 11. Demo
  • 12. Problems with Puppeteer and their Solution ● Loading of an image Rather than directly passing the data, create an html page and goto that page to create PDF. ● Problem with chromium available in puppeteer on EC2 instances Install chromium on EC2 instance explicitly. Set chromium path to the chromium installed. And now instead of puppeteer use puppeteer-core.
  • 13. References ● puppeteer ● What is npm?. ● Node.js Modules. ● Node.js Introduction ● Introduction to HandleBars