承接 g4t/webshot 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

g4t/webshot

最新稳定版本:0.1.1

Composer 安装命令:

composer require g4t/webshot

包简介

Package to take screenshoot for web page as image or pdf.

README 文档

README

Laravel G4T WebShot

Introduction

Laravel G4T WebShot is a powerful PHP package designed to capture screenshots or generate PDFs from any web page. It provides robust functionality for managing and retrieving screen dimensions based on predefined identifiers.

Installation

To install the Laravel G4T WebShot, follow these steps:

  1. Install via Composer:

    composer require g4t/webshot

Usage

Getting Started

  1. Capture and Return Full Path:

To capture a screenshot of a web page and return its URL:

use g4t\WebShot\Screenshot;

$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
                  ->size('14-inc')
                  ->saveAs($save_path)
                  ->url();
  1. Capture and Download:

To capture a screenshot of a web page and download it directlyURL:

use g4t\WebShot\Screenshot;

$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
                  ->size('14-inc')
                  ->saveAs($save_path)
                  ->path();
  1. Capture and Download:

To capture a screenshot of a web page and download it directly:

use g4t\WebShot\Screenshot;

$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
          ->size('14-inc')
          ->saveAs($save_path)
          ->download();
  1. Custom Size:

To specify custom dimensions for the screenshot:

use g4t\WebShot\Screenshot;

$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
          ->customSize(width: 1000, height: 1000)
          ->saveAs($save_path)
          ->download();
  1. The following screen sizes are available:
'13-inc',
'14-inc',
'15-inc',
'16-inc',
'iphone-SE1st',
'iphone-SE-2nd',
'iphone-6',
'iphone-6s',
'iphone-7',
'iphone-8',
'iphone-8-plus',
'iphone-11-pro-max',
'ipad-landscape',
'ipad-pro-10.5-landscape',
'ipad-pro-11-inch-landscape',
'ipad-pro-12.9-inch-landscape',
'full-hd',
'2k',
'4k'

Contributing

Contributions to the Laravel G4T WebShot Package are always welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

The Laravel G4T WebShot is open-source software licensed under the MIT license.

Credits

The Laravel G4T WebShot Package is developed and maintained by HusseinAlaa.

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固