Document Class |
Namespace: ExpertPdf.PdfCreator
The Document type exposes the following members.
Name | Description | |
---|---|---|
Document |
Creates an empty PDF document.
| |
Document(Stream) |
Creates a PDF document object from the specified stream containing the PDF document.
| |
Document(String) |
Creates a PDF document from and existing PDF file.
| |
Document(ColorSpace) |
Creates a PDF document with the specified color space. This property can be used to create
PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
| |
Document(PdfStandardSubset) |
Creates a PDF document based on the specified PDF standard. By default the Full PDF stadard is used.
This property can be used to create PDF/A, PDF/X or PDF/SiqQ compliant documents.
| |
Document(Stream, String) |
Creates a PDF document from a stream cotaining a password protected PDF document.
The specified password can be a user or owner password.
| |
Document(String, String) |
Creates a PDF Document object from an existing password protected PDF file.
| |
Document(PdfStandardSubset, ColorSpace) |
Creates a PDF document based on the specified PDF standard and using the specified color space.
By default the Full PDF stadard is used. This property can be used to create PDF/A, PDF/X or PDF/SiqQ
compliant documents using the specified color space. Plese note that the PDF/X standard will force the
CMYK color space even if a different color space was specified.
|
Name | Description | |
---|---|---|
AutoCloseAppendedDocs |
Gets or sets a value indicating if the PDF documents appended to this document using the
AppendDocument() method are automatically closed when the current document is closed using the
Close() method. The default value is false.
The appended documents must remain open until the current document is saved.
| |
Bookmarks |
Gets the bookmarks collection of the document.
| |
CompressionLevel |
Gets or sets the PDF document compression level
| |
DocumentInformation |
Offers access to the document information object where the document's
title, subject, keywords, etc can be set.
| |
Fonts |
Gets the document fonts collection.
| |
FooterTemplate |
Represents the default PDF document footer template. This footer is automatically considered
when calculating the available space for rendering in a PDF page. This template is automatically
docked to the bottom of the PDF page.
| |
HeaderTemplate |
Represents the default PDF document header template. This header is automatically considered
when calculating the available space for drawing in a PDF page. This template is automatically
docked to the top of the PDF page.
| |
HtmlToPdfConcurrencyLevel |
This static parameter gives the maximum number of threads in the current .NET application domain that can convert HTML to PDF simultaneously.
This parameter must be set before the first conversion performed in the current application domain.
When this property is set with a negative value or zero the concurrency level is maximum. The default value is 4.
| |
JpegCompressionEnabled |
Gets or sets a flag indicating if the JPEG compression is enabled or not for the images in the generated PDF.
By default the JPEG compression is enabled to reduce the size of the generated PDF. When the JPEG compression is enabled
the quality of the images in the generated PDF is lower than the quality of the original images in the HTML document,
function of the JpegCompressionLevel parameter. When the JpegCompressionLevel is increased, the quality of the images in PDF decreases.
| |
JpegCompressionLevel |
Gets or sets the compression level of images in the generated PDF as an integer value between 0 and 100.
This property has effect only when the JpegCompressionEnabled is true.
When the JpegCompressionLevel is 0, the compression rate is the lowest and the quality of the images is the best.
When the JpegCompressionLevel is 100, the compression rate is the highest and quality of the images in PDF is the worst.
The default JPEG compression level is 10, which should offer a good balance between the compression rate and
the quality of the images in PDF.
| |
LeftTemplate |
Represents the default PDF document left template. This left template is automatically considered
when calculating the available space for rendering in a PDF page. This template is automatically
docked to the left side of the PDF page.
| |
Margins |
The default document margins. The new pages will use the default margins
if no marings is specified
| |
OpenAction |
The Go To or JavaScript action to be performed when the PDF document is opened.
| |
Pages |
Gets the document pages collection.
| |
RightTemplate |
Represents the default PDF document right template. This right template is automatically considered
when calculating the available space for rendering in a PDF page. This template is automatically
docked to the right side of the PDF page.
| |
Security |
Offers access to security features of the PDF document like encryption and digital signatures.
| |
Templates |
Gets the document templates collection.
| |
TransparencyEnabled |
Gets or sets a flag indicating if the transparency is enabled in the generated PDF document.
Default value is true. This property can be set to false to eliminate the additional flattening time
when the document is sent to the printer from Adobe Reader viewer.
| |
UseCrossRefStreams |
When this property is true, the generated PDF will store the PDF cross-reference table and PDF trailer in compressed cross-reference streams
and therefore the generated PDF document will be smaller in size.
Set this false for compatibility with third party tools unable to understand the cross-reference streams.
The default value is false for the new documents.
| |
ViewerPreferences |
Offers access to the viewer preferences settings for the document.
| |
xDf |
Internal use only
|
Name | Description | |
---|---|---|
AddBookmark(String, ExplicitDestination) |
Creates a root bookmark for the document
| |
AddBookmark(String, ExplicitDestination, Bookmark) |
Creates a child bookmark for the existing parentBookmark
| |
AddFont(Font) |
Adds a system font to the fonts collection. If the font was already added
the method returns the existing font. By default the font
is embedded in the PDF document in order to support Unicode texts.
| |
AddFont(String) |
Adds a system font to the fonts collection. The font is created from the specified file.
If the font was already added the method returns the existing font.
| |
AddFont(StandardCJKFont) |
Adds a standard CJK font to the collection.
If the font was already added the method returns the existing font.
| |
AddFont(StdFontBaseFamily) |
Adds a standard font to the collection.
If the font was already added the method returns the existing font.
| |
AddFont(Font, Boolean) |
Adds a system font to the fonts collection. If the font was already added
the method returns the existing font. The embedFont property indicates if the added font
will be embedded into the PDF document.
| |
AddPage |
Creates a new PDF page and adds it to the collection. If there is a previous page in the
collection, the orientation and size are inherited from the that page otherwise a first page with
the default A4 size and Portrait orientation is created. The page margins are inherited from the
default document margins
| |
AddPage(Margins) |
Creates a new PDF page and adds it to the collection. If there is a previous page in the
collection, the orientation and size are inherited from the that page otherwise a first page with
the default A4 size and Portrait orientation is created
| |
AddPage(PdfPage) |
Adds the specified page to the document pages collection. The page to be added is allowed to be
from another document. The source document of the page to be added must remain opened until the
current document is saved.
| |
AddPage(PageSize, Margins) |
Creates a new PDF page and adds it to the collection. If there is a previous page in the
collection, the page orientation is inherited from the that page otherwise a first page with
the specified size and Portrait orientation is created
| |
AddPage(PageSize, Margins, PageOrientation) |
Creates a new PDF page with the specified size, margins and orientation and adds it to the collection.
| |
AddTemplate(RectangleF) |
Add a new template with the specified bounds to the document templates collection.
| |
AddTemplate(Single, Single) |
Add a new template with the specified width and height to the document templates collection.
The template location is top left corner of the page.
| |
AppendDocument |
Appends all pages from the another document specified as parameter to the current document.
A custom range of pages from another document can be appended to the current document calling the
Document.Pages.Add(PdfPage pdfPage) method for each page to be appended.
The appended document must remain open until the current document is saved.
| |
Close |
Releases all the resources allocated by this PDF document. Always call this method after the document was saved.
If the document was created from a stream or file, the stream will be closed if it was not explicitly detached
by calling the DetachStream() before the document is closed.
| |
DetachStream |
Call this method to detach the stream from which this document was created. When this method is called before
calling Close(), the Close method will not close the detached stream.
| |
GetPageCount(Stream) |
A fast method to obtain the page count of a specified PDF document.
| |
GetPageCount(String) |
A fast method to obtain the page count of a specified PDF document.
| |
InsertPage(Int32, PdfPage) |
Inserts the specified page into the document pages collection at the specified index.
The page to be added is allowed to be from another document.
The source document of the page to be inserted must remain opened until the
current document is saved.
| |
InsertPage(Int32, PageSize, Margins, PageOrientation) |
Creates a new PDF page with the specified size, margins and orientation and inserts it into the collection
at the specified index.
| |
RemovePage(Int32) |
Removes the PDF page at the specified index in pages collection.
| |
RemovePage(PdfPage) |
Removes the specified PDF page from the pages collection.
| |
Save |
Saves the PDF document as byte array that can be further saved into a file or send over HTTP.
| |
Save(Stream) |
Saves the document into the specified stream.
| |
Save(String) |
Saves the PDF document into the specified file.
| |
Save(HttpResponse, Boolean, String) |
Saves the document into a HTTP stream.
|