This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create new configuration that specifies the error correction | |
Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<EncodeHintType, ErrorCorrectionLevel>(); | |
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); | |
QRCodeWriter writer = new QRCodeWriter(); | |
BitMatrix bitMatrix = null; | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
try { | |
// Create a qr code with the url as content and a size of 250x250 px |
OlderNewer