pdflib textflow

leadercheck问题,发现pdflib真心强大

首先pdflib支持在Wrapping Text around Paths and Images

效果图如下:


其次pdflib支持Placing text in two fitboxes on multiplepages.

效果图如下:


代码如下:

/* Loop until all of the text is placed; create new pages as long as more text needs
	* to be placed. Two columns will be created on all pages.
	*/
	do
	{
		String optlist = "verticalalign=justify linespreadlimit=120%";
		p.begin_page_ext(0, 0, "width=a4.width height=a4.height");
		/* Fill the first column */
		result = p.fit_textflow(tf, llx1, lly1, urx1, ury1, optlist);
		/* Fill the second column if we have more text*/
		if (!result.equals("_stop"))
			result = p.fit_textflow(tf, llx2, lly2, urx2, ury2, optlist);
		p.end_page_ext("");
		/* "_boxfull" means we must continue because there is more text;
		* "_nextpage" is interpreted as "start new column"
		*/
	} while (result.equals("_boxfull") || result.equals("_nextpage"));
	/* Check for errors */
	if (!result.equals("_stop"))
	{
	/* "_boxempty" happens if the box is very small and doesn't hold any text at all.
		*/
		if (result.equals( "_boxempty"))
			throw new Exception("Error: " + p.get_errmsg());
		else
		{
		/* Any other return value is a user exit caused by the "return" option;
		* this requires dedicated code to deal with.
			*/
		}
	}
	p.delete_textflow(tf);

最后还有更牛的,你们感受下




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值