rawilk / laravel-printing
Laravel应用的直接打印功能
v3.0.4
2024-03-10 22:10 UTC
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- guzzlehttp/guzzle: ^7.5
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- mike42/escpos-php: ^4.0
- spatie/laravel-package-tools: ^1.2|^1.13
Requires (Dev)
- laravel/pint: ^1.5
- mockery/mockery: >=1.4
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- pestphp/pest: ^1.20|^2.34
- pestphp/pest-plugin-laravel: ^1.0|^2.2
- php-http/message-factory: ^1.1
- php-http/socket-client: ^2.1
- psr/http-client: ^1.0
- psr/http-message: 1.*
- smalot/cups-ipp: ^0.5.0
- spatie/laravel-ray: ^1.0|^1.29
Suggests
- smalot/cups-ipp: Required when using the CUPS driver
README
Laravel的打印功能允许您的应用直接将PDF文档或原始文本从远程服务器发送到本地网络上的打印机。收据也可以通过首先使用Rawilk\Printing\Receipts\ReceiptPrinter
类生成原始文本,然后通过Printing
外观发送文本作为原始打印作业来打印。
$printJob = Printing::newPrintTask() ->printer($printerId) ->file('path_to_file.pdf') ->send(); $printJob->id(); // the id number returned from the print server
支持的打印驱动程序
- PrintNode: https://printnode.com
- CUPS: https://cups.org
- 自定义: 配置您自己的自定义驱动程序
文档
有关文档,请访问:https://randallwilk.dev/docs/laravel-printing
安装
您可以通过composer安装此包
composer require rawilk/laravel-printing
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="printing-config"
默认配置文件的內容可在此处找到:https://github.com/rawilk/laravel-printing/blob/main/config/printing.php
测试
composer test
更新日志
请参阅CHANGELOG以获取有关最近更改的更多信息。
贡献
请参阅CONTRIBUTING以获取详细信息。
安全
如果您发现任何与安全相关的问题,请通过电子邮件randall@randallwilk.dev而不是使用问题跟踪器。
致谢
- Randall Wilk
- 所有贡献者
- Mike42 为 PHP ESC/POS Print Driver 库
PrintNode API包装器的灵感来源于
免责声明
此包与Laravel或其任何关联公司无任何关联、维护、授权、认可或赞助。
许可
MIT许可证(MIT)。请参阅许可文件以获取更多信息。