feat: add fullpage and maxheight parameters for enhanced screenshot options
All checks were successful
Build Container / docker (push) Successful in 4m13s
All checks were successful
Build Container / docker (push) Successful in 4m13s
This commit is contained in:
@@ -9,7 +9,7 @@ http2pic - PHP website renderer that takes screenshots of URLs and returns them
|
||||
## Architecture
|
||||
|
||||
**Entry point:** `web/index.php` - PSR-4 router with two paths:
|
||||
- `/api` - Chrome/Chromium screenshot via Selenium WebDriver (php-webdriver). Takes `url`, `viewport` (WIDTHxHEIGHT), `js` (true/false) params. Connects to `localhost:4444` ChromeDriver, sets window size, disables scrollbars, takes screenshot as PNG.
|
||||
- `/api` - Chrome/Chromium screenshot via Selenium WebDriver (php-webdriver). Params: `url`, `viewport` (WIDTHxHEIGHT), `js` (true/false), `fullpage` (true/false), `maxheight` (1–30000, default 15000). Connects to `localhost:4444` ChromeDriver, sets window size, takes screenshot as PNG. In fullpage mode, resizes window to full `scrollHeight` (capped at `maxheight`) instead of hiding overflow.
|
||||
- default - renders `src/templates/index.html.php` (landing page).
|
||||
|
||||
**Legacy class:** `src/http2pic.class.php` - Old `wkhtmltoimage`-based renderer (deprecated, not used in production). Supports PNG/JPG, viewport, resize, URL reachability check, file caching.
|
||||
|
||||
Reference in New Issue
Block a user