Skip to content

SL-CODE-LORDS/Web-Screenshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SL Code LORDS

WEB ScreenShot

Status GitHub Issues GitHub Pull Requests License


takes a screenshot of a website or web page and saves it as a PDF file.

📝 Table of Contents

🧐 About

This project takes a screenshot of a website or web page and saves it as a PDF file. The screenshot can be taken of the entire page or of a specific region. The PDF file can be saved in a variety of formats, including PDF/A, PDF/X, and PDF/UA.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes

Installing

yarn add @sl-code-lords/web_screenshot

or

npm i @sl-code-lords/web_screenshot

🎈 Usage

const {WebScreenShot,WebPdf,valid_devices} = require('@sl-code-lords/web_screenshot')
const fs = require('fs')

Screenshot

const device = 'desktop' // tablet or phone
const full_page = false // true

var data = await WebScreenShot('https://ravindumanoj.ml',device,full_page)
fs.writeFileSync('ravindumanoj-ml.png',data)

Pdf

const portrait=true // false for landscape
const zoom = false // true
const print_size = false //true

var data = await WebPdf('https://ravindumanoj.ml',portrait,zoom,print_size)
fs.writeFileSync('ravindumanoj-ml.pdf',data)

✍️ Authors

See also the list of contributors who participated in this project.

About

Download Web Screenshot And Pdf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published