Why html2canvas-pro
html2canvas-pro has several advantages over the original html2canvas, including:
Color Functions
- support color function
color()(including relative colors) - support color function
lab() - support color function
lch() - support color function
oklab() - support color function
oklch()
Layout & Rendering
clip-pathsupport —inset(),circle(),ellipse(),polygon(),path()object-fitsupport for<img/>writing-modesupport — horizontal-tb, vertical-rl, vertical-lr- Image smoothing control — CSS
image-renderingproperty +imageSmoothing/imageSmoothingQualityoptions
Developer Experience
- Security validation — Built-in
ValidatorAPI for XSS/SSRF protection - Performance monitoring — Built-in
PerformanceMonitorAPI for metrics collection - TypeScript — First-class type definitions included
- Vitest — Modern test runner for faster testing
Bug Fixes
Fixed some issues from the original project.
