| Invoice |
|
| This sample shows the on-the-fly pdf creation capabilities of PDF4NET library. Fill the online invoice then download it as pdf. |
|
C# Source code | VB.NET Source code | Run Online |
|
| Extract Images |
|
| This sample shows how to extract images from PDF files as Bitmap objects and save them to disk. |
| C# Source code | VB.NET Source code |
|
| Color Spaces |
|
| This sample shows how to work with various PDF colorspaces.
New color classes have been introduced to allow creation of colors based on specific colorspaces. |
| C# Source code | VB.NET Source code | PDF file |
|
| PANTONE colors |
|
| This sample shows how to work with Pantone colors. These colors are specific instances of separation colors. |
| C# Source code | VB.NET Source code | PDF file |
|
| Digital Signature |
|
| This sample shows how to add digital signatures, based on X.509 certificates, to PDF files. |
| C# Source code | VB.NET Source code | PDF file |
|
| 3D Artwork |
|
| This sample shows how to embed 3D artwork (U3D data) in PDF files.
It shows how to work with 3D annotations, projections, render modes and lighting schemes. |
| C# Source code | VB.NET Source code | PDF file |
|
| Barcodes |
|
| This sample shows how to display barcodes in PDF documents. Both 1D and 2D barcodes are shown.
PDF4NET library does not require any barcode font for displaying barcodes in PDF document. |
| C# Source code | VB.NET Source code | PDF file |
|
| SaveProgress |
|
| This sample shows how use the document's SaveProgress event in order to
display a progress bar in a WinForms application to inform the user how much of the PDF file has been saved. |
| C# Source code | VB.NET Source code |
|
| Form create |
|
| This sample shows how to create a PDF form using PDF4NET library. All supported field types are
included. It also shows how to create a Submit button and attach a SubmitForm action in order to send form data to a server. |
| C# Source code | VB.NET Source code | PDF file |
|
| Form fields enumerator |
|
| This sample shows how to enumerate all fields in a PDF file. Because a field can appear
multiple times in a PDF document (on the same page or on different pages), it is shows the difference between a
field and its widgets (its visual representations). |
| C# Source code | VB.NET Source code | PDF file |
|
| XFA forms fill |
|
| This sample shows how to fill a XFA form using PDF4NET. It loads the PDF file then fills all the
fields in the form with sample values. The sample shows how to fill an image field, a new field type available only in
XFA forms (XFA forms are created with Adobe Designer 7) |
| C# Source code | VB.NET Source code | PDF file |
|
| Forms fill |
|
| This sample shows how to fill a PDF form using PDF4NET. It loads a pdf file then fills all the fields in the document with sample values. |
| C# Source code | VB.NET Source code | PDF file |
|
| Attachments |
|
| This sample shows how to embed file attachments into a PDF document. It also shows how to
inspect the attachments in an existing PDF file and how to extract them. |
| C# Source code | VB.NET Source code | PDF file |
|
| Metafiles |
|
| This sample demonstrates the metafiles support implemented in PDF4NET library.
Enhanced Windows Metafiles are converted to native PDF vector data when using PDFMetafile class.
Metafiles can be scaled or rotated without losing their graphic quality. Metafiles are stored as form XObjects to reduce the file size, and allowing the viewer to cache
their graphic representation when the metafile is displayed multiple times in the same file. |
| C# Source code | VB.NET Source code | PDF file |
|
| Annotations |
|
| This sample demonstrates the support for PDF annotations
implemented in PDF4NET library. Several types of annotations are supported, including transparent annotations. |
| C# Source code | VB.NET Source code | PDF file |
|
| Form XObjects |
|
| This sample demonstrates the support for PDF form XObjects
implemented in PDF4NET library. Form XObjects are graphic blocks that can be
drawn multiple times in a PDF document and their content is stored only once in the PDF file. |
| C# Source code | VB.NET Source code | PDF file |
|
| Layers |
|
| This sample demonstrates the support for layers in a PDF file
implemented in PDF4NET library. Unlimited levels of layers and sublayers can be created. The layers are
stacked on top of each other in the order they were created. |
| C# Source code | VB.NET Source code | PDF file |
|
| Paths |
|
| This sample demonstrates the support for free form paths
implemented in PDF4NET library. A path can be constructed from several drawing
primitives and it can be stroked and/or filled. |
| C# Source code | VB.NET Source code | PDF file |
|
| Stamp PDF |
|
| This sample shows how to stamp a PDF file. A PDF file can be stamped with any combination
of text, graphics, images and annotations. The stamps can be opaque or transparent.
First page in the sample is stamped with a rubber stamp annotation, second page is stamped with regular text
and third page is stamped with a transparent image. |
| C# Source code | VB.NET Source code | PDF file |
|
| Watermarks |
|
| This sample demonstrates how to a watermark to a PDF file. The sample draws a simple text watermark
on each page of a PDF document. Any type of text, graphics and image can be used as watermarks. |
| C# Source code | VB.NET Source code | PDF file |
|
| Images - Updated |
|
This sample shows how to draw images on a page. It draws a normal image, then
it draws another image that is rotated with 30 degrees around the top left
corner. The sample also demonstrates the image transparency capabilities in
PDF4NET library. Color keys masking, image masks and alpha channel transparency are shown. |
| C# Source code | VB.NET Source code | PDF file |
|
| Polygons - Updated |
|
| This sample shows the polygons drawing capabilites. On the first page it draws
a few geometric figures. Second page demonstrates polypolygon drawing capabilities.
For polypolygons the filling mode can be set. |
| C# Source code | VB.NET Source code | PDF file |
|
| Templates - Updated |
|
| This samples shows template capabilites of the PDF4NET library. A template is created from an existing
PDF page. Then it imports a PDF document, adds 10 additional pages and attached the template to the
document. The template is drawn under existing page content. |
| C# Source code | VB.NET Source code | PDF file |
|
| Tiff2PDF |
|
| This sample shows how to convert a multipage TIFF file to PDF. |
| C# Source code | VB.NET Source code |
|
| PDF actions |
|
| This sample shows PDF actions support in PDF4NET. It creates an action to be executed when the document is opened and creates several bookmarks and assigns actions to them. |
| C# Source code | VB.NET Source code | PDF file |
|
| PDF editing |
|
| This sample shows the pdf editing capabilities of PDF4NET library. The following features are shown: mixing 2 different documents, merge files, apply security to existing files, page imposition and pdf file splitting. |
| C# Source code | VB.NET Source code |
|
| PDF security and encryption |
|
| This sample shows the PDF security and encryption support available in PDF4NET library. The user password for the attached pdf file is 'userpass', and the owner password is 'ownerpass'. |
| C# Source code | PDF file |
|
| Update PDF |
|
| This samples shows the import and update capabilities of PDF4NET library. It loads an external pdf file, draws content on the first page of the document, then it creates a new page at the beginning of the document. |
| C# Source code | PDF file |
|
| Textboxes - with TrueType font support |
|
| This sample shows the columnar text drawing capabilities of the PDF4NET library. On the first page, it shows all the possible alignments of the text inside a box. On the second page is shows how to draw rotated text boxes or how to constrain the text to stay inside the box. It also shows how the text can be let to flow out of the box if it does not fit inside it. The text uses Verdana font for display. |
| C# Source code | VB.NET Source code | PDF file |
|
| Unicode |
|
| This samples shows the Unicode capabilities of PDF4NET library. The same text is printed on several pages but translated in various languages. Pages in chinese simplified, chinese traditional, japanese and korean require Adobe Asian Font pack installed. Some of the translations were done automatically, we apologize for any mistakes. |
| C# Source code | PDF file |
|
| Multicolumn HTML text and images |
|
| This sample shows how to draw columnar text that flows over multiple pages. It also demonstrates HTML formatting capabilities of PDF4NET library. |
| C# Source code | VB.NET Source code | PDF file |
|
| Arcs & pies |
|
| This sample demonstrates the arcs and pies drawing capabilities of the PDF4NET library. It creates a two pages document. On the first page, it draws 50 arcs positioned at random locations, with random angles. On the second page, it draws 50 pies positioned at random locations, with random angles. The colors of the arcs and pies are generated randomly. |
| C# Source code | VB.NET Source code | PDF file |
|
| Autonumbering |
|
| This sample demonstrates the autonumbering capabilities of the PDF4NET library. It creates a 100 pages document. Then, it creates 10 numbering ranges, one range for each 10 pages. Each numbering range is considered to be a chapter, the first range is considered to be the introduction. The first numbering range uses roman numbering system, while the others use arabic numbering system. The numbering of the chapters use the chapter number as the prefix for page number. |
| C# Source code | VB.NET Source code | PDF file |
|
| Bezier |
|
| This sample demonstrates the bezier splines drawing capabilities of the PDF4NET library. It creates one page document. On the first page, it draws 50 bezier splines positioned at random locations. The colors of the bezier splines are generated randomly. |
| C# Source code | VB.NET Source code | PDF file |
|
| Bookmarks |
|
| This sample demonstrates the bookmarks capabilities of the PDF4NET library. It creates a 10 pages document. Each page is considered to be a chapter. Each chapter has 2 sections, and each section has 3 paragraphs. Then, the sample builds the corresponding outlines tree, allowing to quickly navigate to each chapter / section / paragraph. |
| C# Source code | VB.NET Source code | PDF file |
|
| Document Information and Viewer Preferences |
|
| This sample shows how to set the metadata information for a pdf document. Also, it demonstrates how to set the way the pdf document is open in the viewer. In this sample, when the pdf document is open in the viewer, the whole user interface of the viewer is hidden. This sample has been enhanced to show how to add custom properties to a document. To view the custom properties, in Adobe Acrobat (Reader) go to File > Document Properties > Document Metadata. |
| C# Source code | VB.NET Source code | PDF file |
|
| Ellipses |
|
| This sample shows the ellipse drawing capabilities of the PDF4NET library. On the first page, it draws an ellipse by painting its border, an ellipse by filling its interior, and an ellipse by painting its border and filling its interior. It also show how to draw a circle. On the second page it draws 50 ellipses at random locations on the page. The color of the ellipses is generated randomly. |
| C# Source code | VB.NET Source code | PDF file |
|
| Grouping Grid |
|
| This sample shows how to draw a complex report with grouping capabilites. It loads the data from an XML file, then draws the lines of the report. The lines of the report are grouped by client id. Each time a new group starts, a group header is drawn, and each time a group ends a group footer is drawn. It also show the usage of Encoding property of the document, because the values in the XML file are UTF-8 encoded. |
| C# Source code | VB.NET Source code | PDF file |
|
| Hello World |
|
| This sample is the simplest pdf file. It draws the string "Hello World" in the center of the page. The text has a red border and it is filled with blue. |
| C# Source code | VB.NET Source code | PDF file |
|
| Lines |
|
| This sample shows the lines drawing capabilites. On the first page it draws random positioned lines, the second page demonstrates the LineCap and LineJoin properties, and on the third page it draws a spiral using an array of consecutive line segments. |
| C# Source code | VB.NET Source code | PDF file |
|
| Links |
|
| This sample shows how to create links in a page that point to other content. It shows all 4 types of links: internal links, external document links, file links and web links. For each type of link, an area link and a text link are created. |
| C# Source code | VB.NET Source code | PDF file |
|
| Page Orientations |
|
| This sample shows how the PDF4NET library allows to create documents with different orientations of their pages. It creates a document with 2 pages. The first page has Portrait orientation, while the second one has Landscape orientation. |
| C# Source code | VB.NET Source code | PDF file |
|
| Page Sizes |
|
| This sample shows how the PDF4NET library allows to create documents with pages of different sizes. It creates a document with 14 pages, each page has a different size. |
| C# Source code | VB.NET Source code | PDF file |
|
| Rectangles |
|
| This sample shows the rectanges drawing capabilities of the PDF4NET library. On the first page, it draws a rectange by painting its border, a rectange by filling its interior, and a rectange by painting its border and filling its interior. It also show how to draw a rotated rectangle. On the second page it draws 50 rectangles at random locations on the page. The color of the rectangles is generated randomly. |
| C# Source code | VB.NET Source code | PDF file |
|
| Simple Grid |
|
| This sample shows how to draw a simple report. The content of the report is loaded from an XML file. |
| C# Source code | VB.NET Source code | PDF file |
|
| Sin(x) Graph |
|
| This sample shows how to use user defined logical units, define them and change the current logical unit during the drawing process. It will also show how to move the coordinate system in order to better fit the drawing needs. The sample will draw the graph of Sin(x) function, using 3 different user defined logical units. These 3 units will be equal on X axis, but they will be different on Y axis. |
| C# Source code | VB.NET Source code | PDF file |
|
| Slide Show |
|
| This sample shows the transition effects between pages available in pdf files. |
| C# Source code | VB.NET Source code | PDF file |
|
| Textlines |
|
| This sample shows the single line text drawing capabilities of the PDF4NET library. On the first page, it shows all the supported fonts. On the second page, it shows how to draw rotated text at random positions and of random size. On the third page it shows all the possible alignments for text lines. |
| C# Source code | VB.NET Source code | PDF file |
| |
| NOTE: The samples provided here are for educational purposes only, to help developers understand and use PDF4NET library more effectively. However, they are provided AS-IS with not support or warranties expressed or implied. If you discover a problem, send an email to techsupport@o2sol.com and we'll try to fix it. |