Pdf
in package
Table of Contents
Methods
- get_info() : mixed
- 取PDF是横排还是竖排 Array ( [header] => Array ( [ModDate] => D [Creator] => Microsoft® PowerPoint® 2019 [CreationDate] => D [Producer] => Microsoft® PowerPoint® 2019 [Author] => Microsoft Office User [Title] => PowerPoint 演示文稿 ) 文档长宽 [dimensions] => Array ( [0] => 960 [1] => 540 ) 2是横版,1是竖版 [dimensions_type] => 2 )
- get_pages() : mixed
- 取pdf页数
- html_to_pdf() : mixed
- HTML转PDF
- image_to_pdf() : mixed
- 图片转PDF
- init() : mixed
- https://mpdf.github.io/
- merger() : mixed
- 合并pdf 输入的数组必须是.pdf格式
- merger2() : mixed
- merger_with_image() : mixed
- 合并PDF,支持图片与pdf文件一起合并
- mpdfInit() : mixed
- pdf_to_image() : mixed
- PDF转图片
- set_info() : mixed
- 设置标题等信息
Methods
get_info()
取PDF是横排还是竖排 Array ( [header] => Array ( [ModDate] => D [Creator] => Microsoft® PowerPoint® 2019 [CreationDate] => D [Producer] => Microsoft® PowerPoint® 2019 [Author] => Microsoft Office User [Title] => PowerPoint 演示文稿 ) 文档长宽 [dimensions] => Array ( [0] => 960 [1] => 540 ) 2是横版,1是竖版 [dimensions_type] => 2 )
public
static get_info(mixed $file) : mixed
Parameters
- $file : mixed
get_pages()
取pdf页数
public
static get_pages(mixed $file) : mixed
Parameters
- $file : mixed
html_to_pdf()
HTML转PDF
public
static html_to_pdf(mixed $input_html_file, mixed $output_pdf_file[, mixed $return_cmd = false ][, mixed $exec = false ]) : mixed
Parameters
- $input_html_file : mixed
- $output_pdf_file : mixed
- $return_cmd : mixed = false
- $exec : mixed = false
image_to_pdf()
图片转PDF
public
static image_to_pdf(mixed $input, mixed $output[, mixed $is_wait = false ]) : mixed
Parameters
- $input : mixed
-
PDF绝对路径
- $output : mixed
-
PDF绝对路径
- $is_wait : mixed = false
init()
https://mpdf.github.io/
public
static init([mixed $option = [] ]) : mixed
Parameters
- $option : mixed = []
merger()
合并pdf 输入的数组必须是.pdf格式
public
static merger([mixed $data = [] ], mixed $new_file) : mixed
Parameters
- $data : mixed = []
-
本地pdf文件绝对路径
- $new_file : mixed
-
合并后的文件名
merger2()
public
static merger2([mixed $files = [] ], mixed $output) : mixed
Parameters
- $files : mixed = []
- $output : mixed
merger_with_image()
合并PDF,支持图片与pdf文件一起合并
public
static merger_with_image([mixed $files = [] ], mixed $output) : mixed
Parameters
- $files : mixed = []
-
PDF绝对路径
- $output : mixed
-
PDF绝对路径
mpdfInit()
public
static mpdfInit([mixed $font_size = 9 ][, mixed $more_options = [] ]) : mixed
Parameters
- $font_size : mixed = 9
- $more_options : mixed = []
pdf_to_image()
PDF转图片
public
static pdf_to_image(mixed $file, mixed $saveToDir) : mixed
Parameters
- $file : mixed
-
本地PDF文件完整路径
- $saveToDir : mixed
set_info()
设置标题等信息
public
static set_info(mixed $file, mixed $output[, mixed $arr = [] ]) : mixed
Parameters
- $file : mixed
- $output : mixed
- $arr : mixed = []