PDF4NET是一種.NET庫,它能夠對運行中的任意.NET應用程序進行創建、編輯和填充PDF文檔。這個庫提供了一個簡單的應用程序接口(API),它允許開發者創建復雜的PDF文檔,或者通過幾行代碼來編輯已有的PDF文檔。它的主要功能可以被分為3個主要部分:PDF的創建,PDF的編輯和PDF格式的填充。此庫對標準.NET框架和壓縮的.NET框架都提供支持。由于PDF4NET的發布是免費的,因此當用PDF4NET進行開發時,工程的花費將會減少。
PDF4NET is a .NET library for creating, editing and filling PDF files on the fly from any .NET application. The library provides a simple API that allows you to create complex PDF documents, or to edit existing PDF files with a few lines of code. Its core functionality can be divided into 3 main areas: PDF creation, PDF editing and PDF forms filling. The library provides support for both standard .NET framework and compact .NET framework. Project costs are reduced when developing with PDF4NET because it can be distributed royalty free.
PDF4NET是一種.NET庫,它能夠對運行中的任意.NET應用程序生成和插入pdf文檔。這個庫不依賴于任何Adobe產品來創建和插入pdf文件。它通過一個簡單的對象模塊把pdf文件復雜的結構隱藏起來,這個對象模塊允許開發者創建復雜的pdf文件或者用幾行代碼來插入已有的pdf文件。PDF4NET庫從屬于GDI+模型,因此減少了學習的時間,提高了工作效率。它使用了基于網格的圖層方法,在文檔頁面中這種圖層方法允許內容的精確定位。最終確定的pdf文件被壓縮以使得該庫能夠適用于Web應用程序。PDF4NET庫能夠從WinForms and WebForms (ASP.NET)應用程序中直接使用而不受任何限制。同時,相同的包包括了該庫的壓縮.NET框架(Compact .NET Framework)版本。這個庫是完全用C#來實現的,能被完全操縱。
PDF4NET庫可以提供給每個開發者,而且它的發行是免費的,這樣就降低了開發者的工程開銷。
當創建PDF文件時,PDF4NET提供了以下特性的支持: 支持文檔的許多屬性,例如:文檔信息,帶有自定義屬性的XMP元數據以及瀏覽器參數
每個文檔的頁數不受限制,每頁都有它自己的大小和在文檔中的定位
可隨機讀取文檔中的任一頁
標題模板,腳注模板和頁面模板
支持羅馬和阿拉伯數字 對頁碼進行自動編號
當采用基于網格的設計方式在頁面中放置內容時,在PDF頁中移動類似于在屏幕中移動。同時這個庫允許創建用戶自定義單元和坐標系統
支持繪圖的基本要素(線、多線、弧、餅圖、長方形、橢圓、貝塞爾曲線)。所有的基本元素都可被畫出或者填充,開發者可全權控制所有的線性系統。同樣PDF4NET庫也可支持對區域的裁剪
RGB、CMYK、Gray色彩空間
支持圖像格式,包括jpeg、gif、bmp、png、emf;圖像可以按比例或進行旋轉后放置在頁面的任何位置;嵌入式的圖像是放在高速緩存中的,因此當同一幅圖像在PDF文件中被多次使用時,它僅僅只被嵌入一次。圖像可以從文件、數據流或者系統中載入。畫圖。位圖。通過缺省值來支持透明圖像,同樣也支持顏色鍵和圖像屏蔽
CCITT G4 用于B/W圖像的壓縮。Tiff2PDF應用有益于這個特性。使用帶有自動文字包的單文本或文本框能支持各種文本設計,這些單文本或文本框也具有自動文本對齊(左對齊、居中對齊、右對齊、或者水平對齊、或者頂對齊、垂直對齊和底對齊)和自動旋轉的特性
當拖動文本的時候,支持HTML格式標識符
支持14種基本字體,Type1 字體, Unicode TrueType字體, System.Drawing. 字體和CJK字體這些字體來自Adobe亞洲語言包(Adobe Asian Language pack)。Type1 字體和TrueType字體能夠被嵌入到PDF文檔中,對于TrueType字體,這個庫能使得字體的子集自動的減小嵌入式字體的大小。字體都在高速緩存中,因此只能有一種字體被嵌入到最終的PDF文件中。
支持PDF超鏈接和文檔書簽。超鏈接的目標可能是同一文檔中的一頁,也可能是另外PDF文檔,或外部非PDF文件,或web中的URL
在文檔、頁和書簽中都支持PDF Actions。只用幾行代碼就能控制PDF文檔的打開,或者控制向開發者的PDF文檔中添加JavaScript代碼。支持PDF安全規范。可以對文檔進行加密和密碼保護,包括用戶和所有者的密碼。庫支持40位和128位的密匙。同時,使用訪問權限來限制對文檔的操作(允許打印,允許文檔組合,允許內容的提取等等)
PDF文件可以被存儲為文件或者數據流,包括HTTP輸出流
當庫用于web應用程序時,可以通過壓縮PDF文件的內容,以減小文件的大小和下載時間
PDF4NET is a .NET library for generating and importing pdf documents on the fly from any .NET application. The library does not rely on any Adobe products for creating and importing pdf files. It hides the complex structure of pdf files behind a simple object model that allows creation of complex pdf files or import of existing pdf files with a few lines of code. The PDF4NET library follows the GDI+ model, thus reducing the learning time and increasing productivity. It uses a grid based layout approach allowing precise positioning of content on document's pages. The final pdf file is compressed, making the library apropriate for web applications. The library can be used both from WinForms and WebForms (ASP.NET) applications without any restrictions. Also, the same package includes a Compact .NET Framework edition of the library. The library is written entirely in C#, being 100% managed.
The PDF4NET library is licensed per developer and can be distributed ROYALTY FREE, reducing your project costs
PDF4NET provides support for the following features when creating PDF files:
- Support for document wide properties like: document information and XMP metadata with custom properties, viewer preferences
- Unlimited number of pages per document, each page with its size and orientation
- Random access to any page in the document
- Headers, footers and page templates
- Automatic page numbering with support for roman and Arabic numerals
- Grid based layout when placing content on page, in this way drawing on a PDF page is much like drawing on the screen. The library also allows creating user defined units and coordinate systems
- Support for basic drawing primitives (lines, poly lines, arcs, pies, rectangles, ellipses, Bezier curves). All primitives can be stroked or filled, and developer has full control over lines styles. Clipping regions are also supported by PDF4NET library
- RGB, CMYK and Gray color spaces
- Support for images, including jpeg, gif, bmp, png, emf; images can be placed anywhere on the page, scaled and rotated; Embedded images are cached, so when the same image is used multiple time in the PDF file, it is embedded only once. Images can be loaded from files, streams or System.Drawing.Bitmap. Transparent images are supported by default, support for color key masking and image masking being also included
- CCITT G4 compression for B/W images. Tiff2PDF applications will benefit most of this feature
Support for various text layouts using single text lines or text boxes with automatic word wrapping, text alignment (left, center, right or justified on horizontal, or top, middle bottom for vertical) and rotation
- Support for HTML formatting tags when drawing text
- Support for base 14 fonts, Type1 fonts, Unicode TrueType fonts, System.Drawing.Font and CJK fonts from Adobe Asian Language pack. Both Type1 and TrueType fonts can be embedded in the PDF document, and for TrueType fonts the library performs font sub setting automatically to reduce the size of the embedded font. The fonts are cached, so only one instance of the font is embedded in the final PDF file
- Support for PDF hyperlinks and document bookmarks. The target of a hyperlink can be a page in the same document, an external PDF file, an external non PDF file or a URL on the web
- PDF Actions are supported at document, page and bookmark level. Control how the PDF document is opened or add custom JavaScript code to your PDF document with a few lines of code
Support for PDF security specification. Documents can be encrypted and password protected, both with user and owner passwords. The library supports both 40bit and 128bit encryption keys. Also, operations on a document can be restricted using access rights (allow print, allow assemble, allow content extraction, etc).
- PDF files can be saved to file or stream, including HTTP output streams
The content of PDF files is compressed to reduce file size and download times when the library is used from a web application