AspPdf

楼主
AspPdf
[P][b]介绍(google自动翻译结果)
[/b]AspPDF是一个动态创建ActiveX服务器组件,阅读和修改便携文件格式(PDF)文件。PDF是事实上的世界创造和交换平台无关的打印文件广泛的标准。让您的ASP  /  ASP.NET的Web应用程序产生的权力和随意修改PDF文件打开您和您的用户带来无穷的机遇。自动生成客户发票。创建密码保护的财务报告。自动化填写表格的过程。生产加密和数字签名的文件。发送文件附件的安全电子邮件。  HTML页面转换为PDF。  AspPDF提供一切以及更多!对于功能的完整列表,请参阅章用户手册1。千万不要错过现场演示展示了部分产品的主要功能很多。我们邀请您创建这些现场演示PDF文件在线申请,审查源代码,并自己如何强大,直观AspPDF的。下载1.9的AspPDF这里免费评估版,现在所拥有的HTML到PDF转换功能和Acrobat  9的文档的支持。 32位和64位两种版本。[/P][P][URL=http://asppdf.com/]主页[/URL]

[URL=http://asppdf.com/download.html]下载[/URL][/P][P]-----------[/P][P]asppdf 加入中文 [/P][P]<%@ CodePage="65001" %>[/P][P]<%@ CodePage="65001" %>[/P][P]


<%@ CodePage="65001" %>


[CODE]<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8">
<TITLE>AspPDF cjk Live Demo</TITLE>
</HEAD>
<BODY>

<TABLE WIDTH="640"><TR><TD>
<FONT FACE="Arial" SIZE="2">

<h3>AspPDF CJK Language Support Demo</h3>
<form action="demo_cjk.asp" METHOD="POST" NAME="MyForm">
Enter document title: <INPUT TYPE="TEXT"NAME="Title" SIZE="40" VALUE="<% = Request("Title") %>"><P>
Type or copy/paste some text in <B>Chinese/Japanese/Korean</B> (CJK) characters:<BR>
<textarea name="largetext" cols="80" rows="16"><% = Request("largetext") %>
</textarea><BR>
<INPUT TYPE="submit" name="Save" Value="Generate PDF">
</form>

<%
     if Request("Save") <> "" Then

           Set Pdf = Server.CreateObject("Persits.Pdf")

           Set Doc = Pdf.CreateDocument

           ' Set title
           Doc.Title = Request("Title")

           Set page = Doc.Pages.Add
   
           ' Use an external file with the SimHei font supporting CJK alphabet
           Set font = Doc.Fonts.LoadFromFile( Server.MapPath("simhei.ttf") )

           Text       = Request("largetext")
           
           ' Parameters: X, Y of upper-left corner of text box, Height, Width
           Set param = pdf.CreateParam("x=100;y=742;height=692;width=412; spacing=2")
         
           Do While Len(Text) > 0      
                 CharsPrinted = Page.Canvas.DrawText(Text, param, font )

                 ' We printed the entire string. Exit loop.
                 if CharsPrinted = Len(Text) Then Exit Do

                 ' Otherwise print remaining text on next page
                 Set Page = Page.NextPage

                 Text = Right( Text, Len(Text) - CharsPrinted)
           Loop

           ' We use Session ID for file names
           ' false means "do not overwrite"
           ' The method returns generated file name
           Path = Server.MapPath( "files") & "\" & Session.SessionID & ".pdf"
           FileName = Doc.Save( Path, false)

           Response.Write "<P><B>Success. Your PDF file <font color=gray>" & FileName & "</font> can be downloaded <A HREF=""files/" & FileName & """><B>here</B></A></B>."
           Set Page = Nothing
           Set Doc = Nothing
           Set Pdf = Nothing

     End If
%>

<P>
<B><A HREF="demo_cjk.zip">Download source code (ASP and ASP.NET/C#) for this demo</A></B>

</FONT>
</TD></TR></TABLE>

</BODY>
</HTML>

[/CODE]
该目录下放入 simhei.ttf  就可以实现中文的pdf文件

http://blog.csdn.net/lyflcear/article/details/8017712

电脑版 Page created in 0.0703 seconds with 4 queries.