If you're an enterprise developer, chances are you've needed to generate data and reports dynamically, and as you know, portable document formats--PDFs--are one of the best ways to maintain formatted data in the long term. PDFs allow us to store documents, share and view documents on a variety of devices, and generally create pleasing output that even supports interactivity.
GrapeCity Documents for PDF was built for .NET Core, with a deep set of features that allows you to generate complex PDF documents with rich content, from text support to multiple languages, images, and security features.
Given those needs, and GrapeCity's long history with PDF controls (ComponentOne's .NET PDF is still very popular) we decided to take our knowledge a few steps further to develop a full PDF library so you can generate PDFs from data, reports, or user input. That's why we've launched GrapeCity Documents for PDF, a complete PDF API solution for working with PDFs in your applications. We built it for .NET Standard 2.0, with a deep set of features that allows you to generate complex PDF documents with rich content, from text support to multiple languages, images, and security features.
The PDF API also helps you work with document properties, add and delete pages, change page layout, generate linerarized PDFs, and control PDF file compression. And, of course, you can generate, load, modify, and save PDFs, all in code.
How would you use a .NET PDF API?
The most popular use cases for .NET PDF API include:
- Read content, add transformations, password protection and watermarking to PDF Files
- Create PDF files in foreign language with necessary fonts and add high security features to the documents
- Create, annotate, and edit PDF files and forms
- Import PDFs, create documents with highly manipulable fields
- Create large PDFs quickly
- Create PDFs and digitally sign them
With Documents for PDF, you can accomplish all of above and in addition, you can create PDF files...
- Product brochures
- Return and exchange forms
- Telecom bills
- Shopping store printing label
- Arabic letter
- Salary slip
- Timesheet forms
- Magazine-style layouts
- Shipping labels
...and plenty more.
Why go with GrapeCity Documents for PDF API library?
5. Font support
16. Page setup
First, the basics:
1. 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.
GrapeCity Documents for PDF is a pure .NET Core library and doesn't rely on any Windows-specific (or any other OS) services to provide any functionality
Many articles will tell you that .NET Core is the future of .NET. Since .NET Core is open source, existing .NET Customers are likely going to migrate their projects to .NET Core (a process that has already begun). Now is the best time to ensure your libraries include .NET Core support, and Documents for PDF was written from the bottom up as pure .NET Core library; it does not rely on any Windows-specific (or any other OS) services to provide any of its functionality. In particular, its rich fonts and text support is a self-contained implementation of the OpenType and Unicode standards.
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.
2. 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.
3. Linearized PDFs
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.
4. Strong text handling to write PDFs with accurate text in multiple languages
5. Font support
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.
6. 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.
7. 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:
8. 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.
9. 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.
10. 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
11. 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.
12. 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.
13. 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.
14. 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.
15. 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.
16. Page setup
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
17. 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.
18. 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.
19. 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.
20. 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
Help us evaluate Documents for PDF! What do you think about the library? Please leave a comment with us and we'll get back to you. Thanks!