PDF file generated on the web page

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.