将标题放置到PDF上 [英] Place a header onto a PDF
本文介绍了将标题放置到PDF上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个将数据导出到pdf的代码.
这是真的,但我想在每页顶部重复一个标题.
此标头是动态生成的,我可以将其传递给会话
我该怎么办?
请帮帮我吗?
这是我的代码的一部分
I have an code for exporting data to pdf.
it is true but i want to repeat a header on top of each page.
This header is genarated dynamically and I could pass it to a session
what should i do?
please help me?
this is part of my code
Dim buffer As [Byte]() = util.createPDF(title.Text, header, array)
Response.ClearContent()
Response.AddHeader("content-disposition", "attachment; filename=test.pdf")
Response.ContentType = "application/pdf"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
Response.[End]()
推荐答案
购买PDF组件.我们使用的是Synchfusion,只有
Buy a PDF component. We use the Synchfusion one, it was only
500,我们很快就能添加代码在PDF上插入页眉和页脚.哦-我看到您有某种PDF库,只是您发布的代码无关.您使用什么图书馆?它支持页眉和页脚吗?如果是这样,请添加标题,然后将其放在每个页面上.
500 and we very quickly were able to add code to insert a header and footer on our PDFs. Oh - I see that you have some sort of PDF library, it''s just that the code you posted is irrelevant. What library do you use ? Does it support headers and footers ? If so, adding a header, puts it on every page.
谢谢
但我可以在每个页面上重新设置标题
但它应该是一个常量定义的字符串
我有许多报告中动态创建的标题
由用户
制造 意思是我有一个fpr报告页面
支持来自数据库的许多头文件
我cuoldnot写得很好,请问
我动态地创建了一个标题
thank you
but i could reapeat header on each page
but it should be a string that define constanly
i have header dynamicly that created in many report
and it is maked by user
by mean i have a page fpr reports
that suported any many headers that come from database
i cuoldnot write english well excuse me
i create a header dynamicly
这篇关于将标题放置到PDF上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文