adminweb/websheet-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

adminweb/websheet-php

最新稳定版本:1.1.2

Composer 安装命令:

composer require adminweb/websheet-php

包简介

Websheet Sdk for generate pdf and send it for email.

README 文档

README

PHP Composer

This package software allow generates pdf (and send it by email) using our services with content in HTML.

Installation

 $ composer require adminweb/websheet-php

Usage

Creates an API Key on https://www.websheet.tech. (No credit card need)

  1. Generate PDF file
<?php

require 'vendor/autoload.php';
use WebSheet\Sdk\Pdf;

$pdf = new Pdf('api-key');

$content = '<html>
                <head>
                    <meta charset="utf-8">
                    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
                    <style>
                        body {font-family: "Tangerine", serif;font-size: 48px; text-shadow: 4px 4px 4px #aaa;}
                    </style>
                </head>
                <body>
                    <div>Making the Web Beautiful!</div>
                </body>
            </html>';

$result = $pdf->make('almost finalizado', $content);

echo $result->id; // ID of file
echo $result->name; // Name of file
echo $result->url; // URL of created PDF file
// Creation date of Pdf file (returns DateTime object) (and formats brazilian format here)
echo $result->createdAt->format('d/m/Y '); 
  1. Generate PDF file and send for email
<?php

require 'vendor/autoload.php';
use WebSheet\Sdk\Pdf;

$pdf = new Pdf('api-key');

$content = '<html>
                <head>
                    <meta charset="utf-8">
                    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
                    <style>
                        body {font-family: "Tangerine", serif;font-size: 48px; text-shadow: 4px 4px 4px #aaa;}
                    </style>
                </head>
                <body>
                    <div>Making the Web Beautiful!</div>
                </body>
            </html>';
            
// The generated file will send by email to destinatary
$result = $pdf->setDestinatary('bob@example.com')->make('almost finalizado', $content); 
  1. Generate PDF file and send for email with your own email template (some plans).
<?php

require 'vendor/autoload.php';
use WebSheet\Sdk\Pdf;

$pdf = new Pdf('api-key');

$content = '<html>
                <head>
                    <meta charset="utf-8">
                    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
                    <style>
                        body {font-family: "Tangerine", serif;font-size: 48px; text-shadow: 4px 4px 4px #aaa;}
                    </style>
                </head>
                <body>
                    <div>Making the Web Beautiful!</div>
                </body>
            </html>';

// The generated file will send by email to destinatary 
// with template registered in https://websheet.tech
$result = $pdf->setDestinatary('bob@example.com')
              ->setTemplate('template ID')
              ->make('almost finalizado', $content); 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固