You can generate, load, analyze, modify, and save PDFs on .NET Core with full support on Windows, Mac, and Linux
The support for .NET Core makes Documents for PDF a cross-platform solution for many developers who are looking for a PDF library to generate PDFs for multi-device applications.
Using Documents for PDF, you can create PDF documents with simple or complex business requirements in .NET Standard applications. Additionally, you can load and modify PDFs from any source and save them again. You can modify annotations, outlines, and form fields in existing PDFs. You can also search text and apply highlighting on it or analyze it as per your needs.
NOTE: System.Drawing.Color is not available by default in Xamarin iOS. In order to use System.Drawing.Color with Documents for PDF, user can add reference to OpenTK-1.0.
Generate PDFs with fast performance, small footprint
Documents for PDF is fast and resource efficient in generating new, or working with existing, PDFs. The lightweight architecture makes it an efficient tool that offers high performance, memory efficiency, and thread safety while generating or modifying PDF documents.
Its strong support of Font, Text classes and the structure of rest of its OM, when used optimally, makes it an efficient tool to generate PDFs and work with them. It also offers a special approach to generating large PDF documents with less memory consumption. The Documents for PDF online demo provides many useful tips on how to take advantage of the Documents for PDF architecture to achieve great results. See this live.
Documents for PDF allows generating linearized PDFs with a simple property that displays the first page quickly so users can start reading and interacting with it, while the rest of the pages are being downloaded. Try the demo.
Strong text handling to write PDFs with accurate text in multiple languages
Considering that there are no System Text functions on .NET Core, Documents for PDF's full text support in .NET Core and other .NET Standard platforms clsoes a huge gap and covers a major requirement to generate PDFs. In addition, to write a PDF in a language other than English, you need a library that supports different kinds of fonts that can work with multilingual characters.
The following fonts and features are supported by the library:
- Standard PDF fonts
- Truetype fonts
- Open type fonts
- WOFF fonts
- Loading of system fonts from the well-known OS-specific locations
- Collections of fronts from program-provided font files
- Ligatures and other font features
- Precise control over font embedding
- Fallback and linked fonts
- EUDC fonts
The default Documents for PDF behavior is to embed subsets of fonts limited to the glyphs that are actually used in the document. This behavior can be controlled to embed whole fonts, not embed fonts at all, or embed just some fonts or subsets.
Additionally, Documents for PDF supports fallback fonts used to search for glyphs that are unavailable in a specified font. Available fallback fonts are loaded from the OS; additionally (or instead of those), developers can provide their own fallback fonts, or link specific fonts for precise control. The Documents for PDF font subsystem is designed to provide excellent performance and a small footprint (font tables are loaded on demand, and weak references are used) and is thread safe. Try the demo.
Advanced text handling
Documents for PDF provides text analysis based on the Unicode standard. Together with the OpenType font support mentioned above, it includes:
- Breakdown of text into clusters and words
- Line breaks
- Bidirectional text
- Script identification
- Vertical characters
- Find Text
Using the above functionality, Documents for PDF supports the following text rendering features:
- Single and multiline text
- Text runs with different formatting in the same paragraph, including:
- Fonts and font styles
- Underline and strikeout
- Base line alignment
- Character and word spacing
- Text and background colors
- Text and paragraph alignment, including full justification
- Line and paragraph spacing
- Hanging indents
- Advanced text splitting, including:
- Widow and orphan control
- Column balancing
- Support for multiple Languages
- Far East Asian Languages
- RTL Languages
- Embedded, inline and anchored objects in text
- Vertical text direction (clockwise, counterclockwise)
Special character support:
- Surrogate pairs and unicode characters
- Character shaping
- Unicode variation sequences
The library also supports FontFeatures, which provide some interesting features from the OpenType specification. So in addition to just applying fonts, you can apply some interesting ligatures on the text. You can make use of the FeatureTag enum to apply these features. Try the demo.
Add images and graphics to your content
Images and graphics (including shapes, gradients, transforms) are fully supported in Documents for PDF. Documents for PDF Library can help you add images of JPEG, PNG and other popular image format. In addition, you can also add hyperlinks to images.
Another way of illustrating your PDFs is through graphic objects. Documents for PDF provides the ability to add following graphic features to your PDFs:
- Linear and Radial Gradients
- Shapes - Ellipse, Rectangle, Polygon, Line, Path
- Stroke and fill shapes
- Clip regions
You can also make use of these basic objects to achieve complex shapes:
Add fillable form fields
One of the most essential features of a PDF is the ability to support fillable form fields. With the Documents for PDF Library, paper and Microsoft Word forms can be easily replicated, and you can add fillable forms in PDFs to your applications. You can add, modify, extract and delete these form fields. You can add all necessary fields like:
- Radio Button
- Push buttons
- Signature Field
These forms can be filled and completed by customers, vendors or everyday users who would use your application. Try the demo.
Add barcodes to encode data
Whether you use the PDF API for inventory management, ticketing systems, advertising, invoices, or shipping labels, the addition of barcodes can make your solution complete. Documents for PDF offers over 50 barcodes (1D and 2D) that you can add anywhere in your PDF. In addition to just adding a barcode, additional properties can result in a complete barcode solution for your PDFs. Try the demo.
Add annotations and save in original file
Since PDFs aren't editable, you may need additional objects to explain your content or collaborate. To add more value to your text, Documents for PDF helps you make use of additional figures, comments, text, signatures and add them to your PDF. You can add, modify, extract and delete annotations in a PDF.
The following annotations can be added anywhere in your PDF:
- File Attachment
- Free Text
Generate, modify and save PDF/A documents
The Documents for PDF Library supports creating PDF/A Files, so you can store your documents in the same state that they exist today. The support for PDF/A ensures preservation and embedding of various content in your digital file.
Work with document properties to maintain history of documents
You can set any of these document properties to maintain a history of your PDF files:
- Creation Date
These properties are also helpful for search engines to find your documents. Try the demo.
Protect and restrict your PDF from copying, editing, or printing
Keeping your PDFs secure is essential to restrict any unauthorized access or modification to your documents. This is particularly required when you're using sensitive information in the PDFs and when certain PDFs are confidential. You can easily protect your documents using Documents for PDF by setting some basic security properties like:
- Standard 40
Using these properties, you can manage overall security of the generated PDFs respective to the audience who view them.
Add digital signatures for document integrity and ownership
When you move from paper to electronic documents, security becomes of utmost importance: who signed or approved the document, if it comes from same source, whether the content is same as original or not, etc. Documents for PDF provides support of Digital Signatures that are difficult to forge because they contain encrypted information unique to the signer and easily verified. Try the demo.
Work with viewer preferences
The View Properties of the library can help you set properties to define exactly how your PDF should look like when it opens. Specifying the initial window size, controlling menubar, toolbar, Windows UI, setting PageMode, etc are some of the options you can control through Viewer Preferences of Documents for PDF.
These properties can also be defined for printing scenarios too.
There's more to setting PDF page size than height and width. The PDF page properties can be expressed through following properties, all part of the PDF specification:
- Media Box: Defines the width and height of the PDF page
- Crop Box: Defines the the size of the page that viewer displays
- Trim Box: Defines the actual Page size that gets printed
- Bleed Box: Determines the region to which the page contents needs to be clipped when output in a production environment.
- Art Box: Defines the area covered by artwork of the page
Stamp your documents for exchange
For a PDF library, it's essential to satisfy most of the features that traditional paper documents dealt with. Text and image stamps on a PDF serve the same purpose as applying rubber stamps to paper. Using such stamps, you can indicate the status of the documents and additional information. We support Text and Image Stamp. Try the demo.
Watermark your PDFs for greater security
While stamps can be moved, changed or deleted, watermarks are static elements displayed under the page. With watermarks, you can add security to your confidential documents; verify if a PDF document is a copy or original; or verify that it's from an authorized company. The Documents for PDF library includes additional watermark properties for further enhancement. Try the demo.
Jump to other sections, web pages
With all the static content, you'll likely also need to make your PDFs interactive. Hyperlinks to email, web or references to other pages can be easily added to your PDF files using Documents for PDF API. Try the demo.
Extensive downloadable samples with quick tips and source code that run on .NET Core
In order to see how to use Documents for PDF features, you'l have access to a detailed Samples Browser, containing examples on usage of different features. The sample also demonstrates tips to make optimized usage of Documents for PDF and simplify your code while coding your PDFs. This can help you to generate your PDFs faster and in memory efficient way. Try the demo