资源简介
PDFLIB的最新也是最后一个免费版本,快来下吧!

代码片段和文件信息
/* $Id: businesscard.cv 1.21 2006/10/01 19:55:41 rjs 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) {
/* This means we must check return values of load_font() etc. */
PDF_set_parameter(p “errorpolicy“ “return“);
/* 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“);
if (PDF_begin_document(p “businesscard.pdf“ 0 ““) == -1) {
printf(“Error: %s\n“ PDF_get_errmsg(p));
return(2);
}
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_document(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_document(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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\
目录 0 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\
文件 753905 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\configure
文件 52591 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\configure.in
文件 580 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\Makefile
文件 2464 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\pdflib-config.in
文件 4504 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\PDFlib.dsw
文件 8941 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\readme.txt
目录 0 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\
文件 179 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\Makefile
目录 0 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\
文件 285 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\Makefile
目录 0 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\
文件 3117 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\businesscard.c
文件 4501 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\businesscard.dsp
文件 4845 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\businesscard.vcproj
文件 1079 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\Carbon.r
文件 4065 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\chartab.c
文件 4431 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\chartab.dsp
文件 4800 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\chartab.vcproj
文件 5379 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\examples_c.dsw
文件 12630 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\examples_c.sln
文件 1683 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\hello.c
文件 4403 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\hello.dsp
文件 4782 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\hello.vcproj
文件 1805 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\hellodl.c
文件 1796 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\image.c
文件 4403 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\image.dsp
文件 4782 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\image.vcproj
文件 6178 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\invoice.c
文件 4431 2012-06-06 13:59 PDFlib-Lite-7.0.5p3\bind\pdflib\c\invoice.dsp
............此处省略733个文件信息
- 上一篇:红蜘蛛电子教室V62免费255用户版XPwin7
- 下一篇:国防科大离散数学课件
相关资源
- Hash1.04(md5校验工具) 绿色免费版
- [免费]A320可靠性计算分析
- [免费]安全加密软件U盘加密,文件加
- [免费]强大的OFFICE经验(Word Excel)
- [免费]图像识别c 源码
- [免费]MW310R V4.0升级软件20140123
- [免费]relax算法成像
- [免费]ISAR单特显点法相位补偿
- [免费]msp430f149控制PS2键盘并用1602显示
- [免费]MFC制作目录树
- [免费]车载CE6.0操作系统
- [免费]基于stm32f103ze 的OLED驱动代码
- 文本分割器(免费 无需安装)
- 文件夹变exe病毒专杀工具免费版.rar
- 压缩包免费破解密码工具
- 网奇Iwms免费模板V34
- HslCommunication 7.0.1 免费版本 免费使用
- 45首mid背景音乐免费
- 华硕P8H61/USB3 R2.0主板BIOS驱动 免费版
- RTL8188EVT USB WIFI无线网卡驱动 免费版
- 百度文库、豆丁、道客巴巴文件免费
- 免费、免安装、超级简单的画户型图
- 官微刷票查票辅助(微信刷票查票辅
- 超级场景清理器(SPCleaner)v1.0免费版
- 意天Windows助手(进程强杀/进程守护
- Excel修复精灵中文免费版2009
- AxureRP8.0学习视频以及免费的软件和元
- 迪龙游戏手柄驱动 v6.0.0.619 绿色免费
- DPK700_700K_700H系列打印机驱动 免费版
- Tomcat7.0.52绿色版
评论
共有 条评论