Invoice - NEW
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 |
Forms fill - NEW
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
|
Tiff2PDF - NEW
This sample shows how to convert a multipage TIFF file to PDF.
C# Source
code | VB.NET Source
code
|
PDF actions - NEW
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
|
Images - NEW
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. New transparency features like color key masking and image masking are also shown.
C# Source
code | VB.NET Source
code | PDF
file
|
PDF editing - NEW
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 samples 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 the 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 |
Polygons
This sample shows the polygons drawing capabilites. On the first page it
draws a few geometric figures.
C# Source
code | VB.NET Source
code | PDF
file |
Random Access
This sample shows the possibilities of random accessing each page of the
document. It creates a document with 10 pages, then the pages are access
in a random order. On each page it is written the time of access. To
better observe the random access, between page writes, there is a few
seconds delay.
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 |
Template
This samples shows template capabilites of the PDF4NET library. It creates
a document with 10 page. Then it creates a template that contains text,
lines and a link and then applies the template on the document.
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. |
| |