⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image.php

📁 这个是pdf开发包 里面包含有pdflib库 还有针对于c c++ java perl,php,python tcl等语言的开发示例 以及一些文档
💻 PHP
字号:
<?php/* $Id: image.php,v 1.13 2004/04/16 20:01:37 tm Exp $ * * PDFlib client: image example in PHP *//* This is where font/image/PDF input files live. Adjust as necessary. */ $searchpath = "../data"; $p = PDF_new();PDF_set_parameter($p, "SearchPath", $searchpath);/*  open new PDF file; insert a file name to create the PDF on disk */if (PDF_begin_document($p, "", "") == 0) {    die("Error: " . PDF_get_errmsg($p));}/* This line is required to avoid problems on Japanese systems */PDF_set_parameter($p, "hypertextencoding", "winansi");PDF_set_info($p, "Creator", "image.php");PDF_set_info($p, "Author", "Rainer Schaaf");PDF_set_info($p, "Title", "image sample (PHP)");$imagefile = "nesrin.jpg";$image = PDF_load_image($p, "auto", $imagefile, "");if (!$image) {    die("Error: " . PDF_get_errmsg($p));}/* dummy page size, will be adjusted by PDF_fit_image() */PDF_begin_page_ext($p, 10, 10, "");PDF_fit_image($p, $image, 0, 0, "adjustpage");PDF_close_image($p, $image);PDF_end_page_ext($p, "");PDF_end_document($p, "");$buf = PDF_get_buffer($p);$len = strlen($buf);header("Content-type: application/pdf");header("Content-Length: $len");header("Content-Disposition: inline; filename=image.pdf");print $buf;PDF_delete($p);?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -