Table of Contents
Project Setup

Overview

This section contains information about how to setup your project to use EO.Pdf library and details about each EO.Pdf namespace.

Add Referece to EO.Pdf dll files

Before you can use EO.Pdf in your project, you must reference EO.Pdf dll files. See here for more details on adding reference to EO dlls.

EO.Pdf Namespaces

In order to use EO.Pdf classes, you must import one or more EO.Pdf namespaces in your code:

//System.Drawing is needed to use color, font, point, etc.
//Because this is a system namespace, you may already have
//imported this namespace. In that case you should not
//import it again
using System.Drawing;

//This is usually the only namespace needed if you only use
//HTML to PDF
using EO.Pdf;

//This is the main namespace you will need in order to use
//ACM (Abstract Content Model) 
using EO.Pdf.Acm;

//The following two namespaces are only needed if you use
//low-level content API
using EO.Pdf.Drawing;
using EO.Pdf.Contents;

EO.Pdf provides the following namespaces:

EO.Pdf

Contains classes that represents basic PDF objects, such as PDF document, page, bookmarks, etc. You would always need to import this namespace.

This namespace also contains the HtmlToPdf class, which is the main class to perform HTML to PDF conversions.

EO.Pdf.Acm

This namespace contains classes related to ACM (Abstract Content Model). PDF is a high-fidelity document format. A PDF file encapsulates complete description of fixed-layout pages as they would appear on an output device. For example, a paragraph that contains multiple line of text would appears as a serial of "text out" commands in the PDF file, each outputs a text string starting at a specific position. In order to generate these commands, one must calculate the length of each word, break them into multiple lines and calculate each line's position. ACM frees programmers from such tasks by allowing programmers to define the document content such as Paragraph, Image, Links, etc, then format them into the final fixed layout page description commands as required by PDF. Because this is the easiest way to create a PDF file, you would almost always need to import this namespace.

EO.Pdf.Drawing

This namespace contains classes related to graphics objects such as font, color and path. Import this namespace if you need to change font style and color or work with path directly.

EO.Pdf.Contents

This namespace contains content classes related to low-level content API. Low-level content API allows you to directly place formatted contents on the output page and can be used to implement "out of flow" contents such as page header and watermarks.