Two methods are described here.
One is asppdf and the other is abcpdf.
All are charged components. The registration code is required, but there are also cracked and trial.
Asppdf: http://www.persits.com/asppdf.exe (you can enter an emailget serial number at http://www.asp;.com/download.html)
Abcpdf: http://down.chinaz.com/soft/4509.htm (with registration code)
ASP. net2.0 test:
Using system;
Using system. Data;
Using system. configuration;
Using system. Web;
Using system. Web. Security;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. webcontrols. webparts;
Using system. Web. UI. htmlcontrols;
Using asppdflib;
Using system. reflection;
Using abcpdf4;
Public partial class _ 1: system. Web. UI. Page
...{
Protected void page_load (Object sender, eventargs E)
...{
Testasppdf ();
Testabcpdf ();
}
Private void testabcpdf ()
...{
Docclass Doc = new docclass ();
Doc. Page = Doc. addpage (missing. value );
// Http: // 10.1.4.43/BBS/index. php? Boardid = 37
// Int id = Doc. addimageurl ("http: // localhost: 2592/test1/2. aspx", true, 500, false );
Int id = Doc. addimageurl ("http://www.google.com/", true, 500, false );
While ("1". Equals (Doc. getinfo (ID, "truncated ")))
...{
Doc. Page = Doc. addpage (missing. value );
Id = Doc. addimagetochain (ID );
}
Doc. Save (server. mappath ("2.ath "));
}
Private void testasppdf ()
...{
Ipdfmanager objpdf = new pipeline Manager ();
// Create empty document
Ipdfdocument objdoc = objpdf. createdocument (missing. value );
// Ipdffont font = objdoc. fonts. loadfromfile ("C: \ WINDOWS \ fonts \ simhei. TTF ");
Objdoc. importfromurl ("http://www.google.com/", missing. Value, missing. Value, missing. value );
String strfilename = objdoc. Save (server. mappath ("1.ath"), false );
}
}
Asppdf does not support Chinese characters:
Abcpdf is good. You need to manually set the size, but it is not set:
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/kimmking/archive/2008/01/07/2029351.aspx