生成.pdf的? [英] Generate .pdf's?
本文介绍了生成.pdf的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以将ASP.NET页面的输出作为Adobe .pdf文件吗?我不是/ b $ b意味着我想输出.pdf文件名。我的意思是我想以.pdf格式输出一个
的文件。
谢谢。
Can I have the output from an ASP.NET page be an Adobe .pdf file? I don''t
mean that I want to output a .pdf file name. I mean I want to output a
document in .pdf format.
Thank you.
推荐答案
" Scott M." < S - *** @ nospam.nospam>在消息中写道
新闻:eT ************** @ TK2MSFTNGP12.phx.gbl ...
"Scott M." <s-***@nospam.nospam> wrote in message
news:eT**************@TK2MSFTNGP12.phx.gbl...
我可以输出从ASP.NET页面是一个Adobe .pdf文件?我不是说我想输出.pdf文件名。我的意思是我想以.pdf格式输出
文件。
谢谢。
Can I have the output from an ASP.NET page be an Adobe .pdf file? I don''t
mean that I want to output a .pdf file name. I mean I want to output a
document in .pdf format.
Thank you.
是
Yes
< br>
" Scott M." < S - *** @ nospam.nospam> schrieb:
"Scott M." <s-***@nospam.nospam> schrieb:
我可以将ASP.NET页面的输出作为Adobe .pdf文件吗?我不是说我想输出.pdf文件名。我的意思是我想以.pdf格式输出
文档。
Can I have the output from an ASP.NET page be an Adobe .pdf file? I don''t
mean that I want to output a .pdf file name. I mean I want to output a
document in .pdf format.
设置''Response''对象''''ContentType''属性到application / pdf并且
写回复...
-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>
Set the ''Response'' object''s ''ContentType'' property to "application/pdf" and
write the response...
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
这是一个使用开源SharpPdf库的简单示例。
http://sharppdf.it/home.asp
Private Sub btnPDF_Click(ByVal sender As System.Object,ByVal e As
System.EventArgs)处理btnPDF.Click
Response.Clear()
''将内容类型设置为PDF
Response.ContentType =" application / pdf"
''将带有pdf文件的缓冲区写入输出
Dim myDoc As new sharpPDF.pdfDocument(" Image Application",Me,
False)
''创建pdf的第一页
Dim myPage As sharpPDF.pdfPage
myPage =
myDoc.addPage(Enumerators.predefinedPageSize.csSha rpPDFFormat)
myPage.drawCircle (300,550,100,pdfColor.DarkBlue,pdfColor.Blue)
''最后写下pdf
myDoc.createPDF(Response.OutputStream)
Response.End()
结束子
肯
------- -------------
" Scott M." < S - *** @ nospam.nospam>在留言中写道
新闻:eT ************** @ TK2MSFTNGP12.phx.gbl ...
我可以输出从ASP.NET页面是一个Adobe .pdf文件?我不是/ b $ b意味着我想输出.pdf文件名。我的意思是我想以.pdf格式输出一个
的文件。
谢谢。
Hi,
Here is a simple example that use the open source SharpPdf library.
http://sharppdf.it/home.asp
Private Sub btnPDF_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPDF.Click
Response.Clear()
'' set the content type to PDF
Response.ContentType = "application/pdf"
'' write the buffer with pdf file to the output
Dim myDoc As New sharpPDF.pdfDocument("Image Application", "Me",
False)
'' create the first page for the pdf
Dim myPage As sharpPDF.pdfPage
myPage =
myDoc.addPage(Enumerators.predefinedPageSize.csSha rpPDFFormat)
myPage.drawCircle(300, 550, 100, pdfColor.DarkBlue, pdfColor.Blue)
'' Finally write the pdf
myDoc.createPDF(Response.OutputStream)
Response.End()
End Sub
Ken
--------------------
"Scott M." <s-***@nospam.nospam> wrote in message
news:eT**************@TK2MSFTNGP12.phx.gbl...
Can I have the output from an ASP.NET page be an Adobe .pdf file? I don''t
mean that I want to output a .pdf file name. I mean I want to output a
document in .pdf format.
Thank you.
这篇关于生成.pdf的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文