资源简介
PDFLib 里面包含有lib库 以及针对java开发组件和开发示例 同时里面还有c++ php c perl等语言的开发示例 欢迎大家下载阿
代码片段和文件信息
/* $Id: businesscard.cv 1.18 2004/05/17 14:30:25 kurt Exp $
*
* PDFlib client: block processing example in C
*/
#include
#include
#include “pdflib.h“
int
main(void)
{
PDF *p;
int i blockcontainer page;
char *infile = “boilerplate.pdf“;
/*
* This is where font/image/PDF input files live. Adjust as necessary.
*
* Note that this directory must also contain the LuciduxSans font outline
* and metrics files.
*/
char *searchpath = “../data“;
typedef struct { char *name; char *value; } blockdata;
blockdata data[] = {
{ “name“ “Victor Kraxi“ }
{ “business.title“ “Chief Paper Officer“ }
{ “business.address.line1“ “17 Aviation Road“ }
{ “business.address.city“ “Paperfield“ }
{ “business.telephone.voice““phone +1 234 567-89“ }
{ “business.telephone.fax“ “fax +1 234 567-98“ }
{ “business.email“ “victor@kraxi.com“ }
{ “business.homepage“ “www.kraxi.com“ }
};
#define BLOCKCOUNT (sizeof(data)/sizeof(data[0]))
/* create a new PDFlib object */
if ((p = PDF_new()) == (PDF *) 0)
{
printf(“Couldn‘t create PDFlib object (out of memory)!\n“);
return(2);
}
PDF_TRY(p) {
if (PDF_begin_document(p “businesscard.pdf“ 0 ““) == -1) {
printf(“Error: %s\n“ PDF_get_errmsg(p));
return(2);
}
/* Set the search path for fonts and PDF files */
PDF_set_parameter(p “SearchPath“ searchpath);
/* This line is required to avoid problems on Japanese systems */
PDF_set_parameter(p “hypertextencoding“ “host“);
PDF_set_info(p “Creator“ “businesscard.c“);
PDF_set_info(p “Author“ “Thomas Merz“);
PDF_set_info(p “title““PDFlib block processing sample (C)“);
blockcontainer = PDF_open_pdi(p infile ““ 0);
if (blockcontainer == -1) {
printf(“Error: %s\n“ PDF_get_errmsg(p));
return(2);
}
page = PDF_open_pdi_page(p blockcontainer 1 ““);
if (page == -1) {
printf(“Error: %s\n“ PDF_get_errmsg(p));
return(2);
}
PDF_begin_page_ext(p 20 20 ““); /* dummy page size */
/* This will adjust the page size to the block container‘s size. */
PDF_fit_pdi_page(p page 0 0 “adjustpage“);
/* Fill all text blocks with dynamic data */
for (i = 0; i < (int) BLOCKCOUNT; i++) {
if (PDF_fill_textblock(p page data[i].name data[i].value 0
“embedding encoding=host“) == -1) {
printf(“Warning: %s\n“ PDF_get_errmsg(p));
}
}
PDF_end_page_ext(p ““);
PDF_close_pdi_page(p page);
PDF_end_document(p ““);
PDF_close_pdi(p blockcontainer);
}
PDF_CATCH(p) {
printf(“PDFlib exception occurred in businesscard sample:\n“);
printf(“[%d] %s: %s\n“
PDF_get_errnum(p) PDF_get_apiname(p) PDF_get_errmsg(p));
PDF_delete(p);
return(2);
}
PDF_delete(p);
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2978 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\businesscard.c
文件 4501 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\businesscard.dsp
文件 3248 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\chartab.c
文件 4431 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\chartab.dsp
文件 1703 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\examples_c.dsw
文件 1456 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\hello.c
文件 4403 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\hello.dsp
文件 1805 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\hellodl.c
文件 4596 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\hellodl.dsp
文件 1679 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\image.c
文件 4403 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\image.dsp
文件 5932 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\invoice.c
文件 4431 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\invoice.dsp
文件 2937 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\pdfclock.c
文件 4445 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\pdfclock.dsp
文件 36808 2005-08-10 14:21 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\pdflib.lib
文件 14079 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\pdflibdl.c
文件 2380 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\pdflibdl.h
文件 2768 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\quickreference.c
文件 4529 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\quickreference.dsp
文件 94 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\readme.txt
文件 886151 2005-08-10 14:21 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c\samples.mcp
目录 0 2008-03-13 05:56 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\c
文件 2987 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\businesscard.cpp
文件 4538 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\businesscard.dsp
文件 2977 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\chartab.cpp
文件 4468 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\chartab.dsp
文件 1703 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\examples_cpp.dsw
文件 1150 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\hello.cpp
文件 4440 2005-08-10 14:22 PDFlib-6.0.2-Windows\PDFlib-6.0.2-Windows\bind\cpp\hello.dsp
............此处省略134个文件信息
- 上一篇:jsp 课程设计 很简单的
- 下一篇:基于NetBean开发的jsp网上购物项目
相关资源
- JSP+Mysql教师教学质量测评系统论文
- Java Web项目开发案例精粹15-个人理财管
- Java Web项目开发案例精粹13-仓库管理系
- 最全的图书管理系统java+mysql
- java scp实现方式
- java增删改查小项目
- 图书进存销系统 java GUI 界面 mysql 数据
- 电影院管理系统——毕业设计模板文
- java版超级玛丽源代码
- java通讯录java通讯录java通讯录
- 《JAVA程序设计教程》第二版施霞萍编
- 校园小商品交易系统 java
- java dvd影碟管理系统
- iText-5.0.6.jar
- java项目当当网完整版
- Java数据库系统开发案例精选.rar
- java SQL 超市管理系统
- 韩顺平java从入门到精通上课所有笔记
- 人口信息管理系统java
- java学生管理系统详细论文
- 英汉互译电子词典JAVA Web版
- jlu软件学院软构件与中间件JavaEE课设
- 基于JAVA的在线考试系统 可做毕业设计
- 学生信息管理系统源码(JAVA 毕业设计
- 基于JAVA的局域网文件共享平台P2P实训
- 基于JAVA开发的网上商城源码(毕业设
- 《Java程序设计与实训》配套资料源码
- 进销存管理系统 毕业设计 库存管理系
- JavaEE Eclipse 的安装与使用
- 使用Ztree实现java动态树形菜单
评论
共有 条评论