asp把指定網址的內容產生為PDF檔案ABCPDF asp 產生pdf

來源:互聯網
上載者:User
 

使用ABCPDF可以把指定網頁中的圖片文字產生為PDF檔案。

7.0.1.1Professnional版下載網址:

http://www.3ddown.com/soft/12233.htm

標準版序號(Standard License):341-639-358
專業版序號(Professnional License):719-253-057

官方網址:

http://www.websupergoo.com

把指定網址的全部內容及圖片產生為PDF並自動分頁代碼:

123456789101112131415161718192021222324 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Set theDoc = Server.CreateObject("ABCpdf7.Doc") theDoc.Rect.Inset 72, 144   theDoc.Page = theDoc.AddPage() theURL = "http://www.isxml.com/" '要產生的PDF源內容的網址 theID = theDoc.AddImageUrl(theURL)   Do  theDoc.FrameRect ' add a black border   If Not theDoc.Chainable(theID) Then Exit Do  theDoc.Page = theDoc.AddPage()   theID = theDoc.AddImageToChain(theID) Loop  For i = 1 To theDoc.PageCount   theDoc.PageNumber = i   theDoc.Flatten Next  theDoc.Save "D:\dhtml.pdf" '儲存檔案的路徑 response.Write("PDF產生成功!") %>

產生指定文字的代碼:

12345 <%Set theDoc = Server.CreateObject("ABCpdf7.Doc") theDoc.FontSize = 96 theDoc.AddText "Hello World"theDoc.Save "c:\mypdfs\simple.pdf" '為儲存的檔案路徑,請自行更改到IIS網站目錄裡面。 %>

注意事項:

 C:\WINDOWS\system32\ABCpdfCE7.dll
需要有寫入修改許可權另外,產生PDF用了NET Framework中的MSXML功能
我安裝的是NET Framework4.0
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.