pdftron.PDF Namespace |
Class | Description | |
---|---|---|
Action | Action that is triggered when the document is opened. The returned action can be either a destination or some other kind of Action (see Section 8.5, 'Actions' in PDF Reference Manual).
| |
ActionEventArgs | Class for Transporting the OnAction event | |
ActionParameter |
Container for parameters used in handling various actions
| |
Annot |
Annot class
| |
AnnotBorderStyle | BorderStyle structure specifies the Characteristics of the annotation’s border.
The border is specified as a rounded rectangle.
| |
BitmapInfo |
Represents a raw bitmap returned by PDFDraw.GetRawBitmapAsync.
| |
Bookmark | Gets the first bookmark
| |
CharData | CharData is a data structure returned by CharIterator that is
used to provide extra information about a Character within
a text run. The extra information includes positioning information,
the Character data and a number of bytes taken by the Character.
| |
CharIterator | CharIterator is an iterator type that can be used to traverse CharData
in the current e_text element. For a sample use case, please take a look
at ElementReaderAdv sample project.
| |
ColorPt | ColorPt is an Array of colorants (or tint values) representing a color point
in an associated color space.
| |
ColorSpace | This abstract class is used to serve as a color space tag to identify the specific
color space of a Color object. It contains methods that transform colors in a specific
color space to/from several color space such as DeviceRGB and DeviceCMYK.
For purposes of the methods in this class, colors are represented as Arrays of color
components represented as doubles in a normalized range defined by each ColorSpace.
For many ColorSpaces (e.g. DeviceRGB), this range is 0.0 to 1.0. However, some ColorSpaces
have components whose values have a different range. Methods are provided to inquire per
component minimum and maximum normalized values.
| |
ContentReplacer |
ContentReplacer is a utility class for replacing content (text and images)
in existing PDF (template) documents.
Users can replace content in a PDF page using the following operations:
- Replace an image that exists in a target rectangle with a replacement image.
- Replace text that exists in a target rectangle with replacement text.
- Replace all instances of a specially marked string with replacement string.
Examples
The following code replaces an image in a target region. It also replaces
the text "[NAME]" and "[JOB_TITLE]" with "John Smith"
and "Software Developer" respectively. Notice the square braces ('[' and ']') on
the target strings in the original PDFDoc. These square braces are not included in
the actual function calls below, as they're implicitly added.
PDFDoc doc("../../TestFiles/BusinessCardTemplate.pdf"); doc.InitSecurityHandler(); ContentReplacer replacer; Page pg = doc.GetPage(1); Image img = Image::Create(doc, "../../TestFiles/peppers.jpg"); replacer.AddImage(page.GetMediaBox(), img.GetSDFObj()); replacer.AddString("NAME", "John Smith"); replacer.AddString("JOB_TITLE", "Software Developer"); replacer.Process(page); | |
ConversionMonitor | Allows for progress reporting of a conversion
| |
Convert |
Converter is a utility class used to convert documents and files to PDF. Conversion of XPS, EMF and image
files to PDF documents is performed internally. Other document formats are converted via native application
and printing.
| |
CubicCurveBuilder |
Creates Cubic Curves from linear points
| |
Date | Gets the creation date.
| |
Destination | A utility method used to set the fist page displayed after
the document is opened. This method is equivalent to
PDFDoc::SetOpenAction(goto_action)
If OpenAction is not specified the document should be
opened to the top of the first page at the default magnification
factor.
| |
DiffOptions |
Class to check differences
| |
DigitalSignatureField |
A class representing a digital signature form field.
| |
DigitalSignatureFieldIterator | DigitalSignatureFieldIterator is an iterator type that can be used to traverse a list
of digital signature form fields in a PDF document.
| |
DisallowedChange |
Data pertaining to a change detected in a document during a digital
signature modification permissions verification step, the change being
both made after the signature was signed, and disallowed by the
signature's permissions settings.
| |
DocumentConversion |
Encapsulates the conversion of a single document from one format to another.
| |
DocumentPreviewCache | DocumentPreviewCache is a persistent cache that provides thumbnails for browsing in PDFNet.
The cache is placed in the sub - directory 'trn_DocumentPreviewCache' of the PDFNet Resources folder,
which can be set by calling PDFNet::SetPersistentCachePath.In the case the
PersistentCachePath is not set the files will be stored in the system temp path
(PDFNet::GetSystemTempPath()).The cache will be used by any PDFNet process that
uses the resource path.If more than one PDFNet process is running concurrently,
the first process to acquire a lock on the cache will use it.Subsequent processes
will not read or modify the cache.
DocumentPreviewCache will store references to generated JPG thumbnails and keeps track of
the dimensions of the thumbnail and the filesize of the specific pdf documents.
Furthermore it takes care that the size constraints(max_cache_bytes, max_disk_percentage)
are met and it cleans the oldest(in terms of last request) thumbs from the cache
in case of a overflow.
If the user requests a file that is already in the cache and the requested thumb dimensions
are smaller or equal than the ones of the cache - version the URL of the cached thumb is given
back.If the dimensions are bigger the thumb gets rendered again, the old thumb gets
replaced and the URL is given back.
If the size of the pdf document changes the thumb will be rendered again even when there is
a version of that thumbnail in the cache.In case that the user wants to suppress the
re-rendering of that specific thumb(e.g.when the change on the pdf document was made
on another page than the first page which is used for the thumb), IrrelevantChangeMade has to
be called.
Remarks Note: Always call the DocumentPreviewCache from the UI thread. | |
Element | Element is the abstract interface used to access graphical elements used to build the
display list.
Just like many other classes in PDFNet (e.g. ColorSpace, Font, Annot, etc), Element
class follows the composite design pattern. This means that all Elements are
accessed through the same interface, but depending on the Element type (that can be
obtained using GetType()), only methods related to that type can be called.
For example, if GetType() returns e_image, it is illegal to call a method specific to
another Element type (i.e. a call to a text specific GetTextData() will throw an
Exception).
| |
ElementBuilder | ElementBuilder is used to build new PDF.Elements (e.g. image, text, path, etc)
from scratch. In conjunction with ElementWriter, ElementBuilder can be used to create
new page content.
| |
ElementReader | ElementReader can be used to parse and process content streams. ElementReader provides a
convenient interface used to traverse the Element display list of a page. The display list
representing graphical elements (such as text-runs, paths, images, shadings, forms, etc) is
accessed using the intrinsic iterator. ElementReader automatically concatenates page contents
spanning multiple streams and provides a mechanism to parse contents of sub-display lists
(e.g. forms XObjects and Type3 fonts).
| |
ElementWriter | ElementWriter can be used to assemble and write new content to a page, Form XObject,
Type3 Glyph stream, pattern stream, or any other content stream.
| |
EmbeddedTimestampVerificationResult |
This class represents the result of verifying a secure embedded
timestamp digital signature.
| |
ExternalAnnotManager |
The class ExternalAnnotManager.
A manager class attached to a PDFView that takes care of annotations
from xfdf sources
ExternalAnnotManager instances are created through the PDFView using PDFView.GetExternalAnnotManager()
| |
Field | Flatten/Merge existing form field appearances with the page content and
remove widget annotation.
Form 'flattening' refers to the operation that changes active form fields
into a static area that is part of the PDF document, just like the other
text and images in the document. A completely flattened PDF form does not
have any widget annotations or interactive fields.
| |
FieldIterator | FieldIterator is an iterator type that can be used to traverse a list
form fields in a PDF document. For more information, please PDFDoc.getFieldIterator().
| |
FileSpec | Associates a file attachment with the document.
The file attachment will be displayed in the user interface of a viewer application
(in Acrobat this is File Attachment tab). The function differs from
Annot.CreateFileAttachment() because it associates the attachment with the
whole document instead of an annotation on a specific page.
| |
Font |
A font that is used to draw text on a page. It corresponds to a Font Resource
in a PDF file. More than one page may reference the same Font object.
A Font has a number of attributes, including an Array of widths, the Character
encoding, and the font's resource name.
PDF document can contain several different types of fonts and Font class
represents a single, flat interface around all PDF font types.
There are two main classes of fonts in PDF: simple and composite fonts.
Simple fonts are Type1, TrueType, and Type3 fonts. All simple fonts have the
following properties:
| |
FontCharCodeIterator | FontCharCodeIterator is an iterator type that can be used to traverse a list
of visible Char codes in a font embedded in PDF. For more information, please
take a look at Font.getCodeIterator().
| |
Function | Although PDF is not a programming language it provides several types of function
object that represent parameterized classes of functions, including mathematical
formulas and sampled representations with arbitrary resolution. Functions are used
in various ways in PDF, including device-dependent rasterization information for
high-quality printing (halftone spot functions and transfer functions), color
transform functions for certain color spaces, and specification of colors as a
function of position for smooth shadings. Functions in PDF represent static,
self-contained numerical transformations.
PDF::Function represents a single, flat interface around all PDF function types.
| |
GeometryCollection |
A Preprocessed PDF geometry collection
| |
GSChangesIterator | GSChangesIterator is an iterator type that can be used to traverse a list
of changes in the graphics state between subsequent graphical elements on the
page. For a sample use case, please take a look at ElementReaderAdv sample project.
| |
GState | GState is a class that keeps track of a number of style attributes used to visually
define graphical Elements. Each PDF::Element has an associated GState that can be used to
query or set various graphics properties.
| |
Highlights | Get a Highlights object based on an array of character ranges
| |
HTTPRequestOptions | Class for customizing network requests. | |
Image |
The Image class provides common methods for working with PDF images.
| |
KeyStrokeActionResult |
A class that contains information from a KeyStrokeAction.
| |
KeyStrokeEventData |
KeyStrokeEventData contains information for executing KeyStrokeAction
| |
MergeXFDFOptions | ||
OCRModule |
static interface to PDFTron SDKs OCR functionality
| |
OfficeToPDFOptions |
Conversion options to be used when converting Office to PDF.
| |
Optimizer | The Optimizer class provides functionality for optimizing/shrinking output PDF files. 'pdftron.PDF.Optimizer' is an optional PDFNet Add-On utility class that can be used to optimize PDF documents by reducing the file size, removing redundant information, and compressing data streams using the latest in image compression technology. PDF Optimizer can compress and shrink PDF file size with the following operations:
| |
OptimizerImageSettings | A class that stores downsampling/recompression
settings for color and grayscale images.
| |
OptimizerMonoImageSettings | A class that stores image downsampling/recompression
settings for monochrome images.
| |
OptimizerOptimizerSettings | A class that stores settings
for the optimizer | |
OptimizerTextSettings | A class that stores text optimization settings.
| |
OptionsHelpers | ||
Page | Page is a high-level class representing PDF page object (see 'Page Objects' in
Section 3.6.2, 'Page Tree,' in PDF Reference Manual).
Among other associated objects, a page object contains:
| |
PageIterator | PageIterator is an iterator type that can be used to traverse a list
pages in a PDF document. For more information, please PDFDoc::GetPageIterator().
| |
PageLabel | PDF page labels can be used to describe a page. This is used to allow for non-sequential page numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the beginning of a book). PDFNet PageLabel object can be used to specify the numbering style to use (for example, upper- or lower-case Roman, decimal, and so forth), the starting number for the first page, and an arbitrary prefix to be pre-appended to each number (for example, "A-" to generate "A-1", "A-2", "A-3", and so forth.) PageLabel corresponds to the PDF Page Label object (Section 8.3.1, 'Page Labels' in the PDF Reference Manual. Each page in a PDF document is identified by an integer page index that expresses the page's relative position within the document. In addition, a document may optionally define page labels to identify each page visually on the screen or in print. Page labels and page indices need not coincide: the indices are fixed, running consecutively through the document starting from 1 for the first page, but the labels can be specified in any way that is appropriate for the particular document. For example, if the document begins with 12 pages of front matter numbered in roman numerals and the remainder of the document is numbered in Arabic, the first page would have a page index of 1 and a page label of i, the twelfth page would have index 12 and label xii, and the thirteenth page would have index 13 and label 1. For purposes of page labeling, a document can be divided into labeling ranges, each of which is a series of consecutive pages using the same numbering system. Pages within a range are numbered sequentially in ascending order. A page's label consists of a numeric portion based on its position within its labeling range, optionally preceded by a label prefix denoting the range itself. For example, the pages in an appendix might be labeled with decimal numeric portions prefixed with the string "A-" and the resulting page labels would be "A-1", "A-2", There is no default numbering style; if no 'S' (Style) entry is present, page labels consist solely of a label prefix with no numeric portion. For example, if the 'P' entry (Prefix) specifies the label prefix "Appendix", each page is simply labeled "Appendix" with no page number. If the 'P' entry is also missing or empty, the page label is an empty string.Examples
Sample code (See PableLabelsTest sample project for examples):
Create a page labeling scheme that starts with the first page in
the document (page 1) and is using uppercase roman numbering
style.
doc.SetPageLabel(1, PageLabel::Create(doc, PageLabel::e_roman_uppercase, "My Prefix ", 1)); PageLabel L2 = PageLabel::Create(doc, PageLabel::e_decimal, "My Prefix ", 4); doc.SetPageLabel(4, L2); PageLabel L3 = PageLabel::Create(doc, PageLabel::e_alphabetic_uppercase, "My Prefix ", 1); doc.SetPageLabel(7, L3); PageLabel label = new PageLabel(); for (int i=1; i<=doc.GetPageCount(); ++i) { label = doc.GetPageLabel(i); if (label.IsValid()) { string title = label.GetLabelTitle(i); } | |
PageSet | PageSet is a container of page numbers ordered following a linear sequence.
The page numbers are integers and must be greater than zero. Duplicates are allowed.
| |
PathData |
Contains the information required to draw the path. Contains an Array of
PathSegmentType Operators and corresponding path data Points. A point may
be on or off (off points are control points). The meaning of a point
depends on associated id (or segment type) in the path segment type Array.
| |
PatternColor | Patterns are quite general, and have many uses; for example, they can be used
to create various graphical textures, such as weaves, brick walls, sunbursts,
and similar geometrical and chromatic effects.
Patterns are specified in a special family of color spaces named Pattern, whose
'color values' are PatternColor objects instead of the numeric component values
used with other spaces. Therefore PatternColor is to pattern color space what is
ColorPt to all other color spaces.
A tiling pattern consists of a small graphical figure called a pattern cell.
Painting with the pattern replicates the cell at fixed horizontal and vertical
intervals to fill an area. The effect is as if the figure were painted on the
surface of a clear glass tile, identical copies of which were then laid down
in an Array covering the area and trimmed to its boundaries. This is called
tiling the area.
The pattern cell can include graphical elements such as filled areas, text,
and sampled images. Its shape need not be rectangular, and the spacing of
tiles can differ from the dimensions of the cell itself.
The order in which individual tiles (instances of the cell) are painted is
unspecified and unpredictable; it is inadvisable for the figures on adjacent
tiles to overlap.
| |
PDFDoc |
PDFDoc is a high-level class describing a single PDF (Portable Document
Format) document. Most applications using PDFNet will use this class to
open existing PDF documents, or to create new PDF documents from scratch.
The class offers a number of entry points into the document. For example,
| |
PDFDocGenerator |
It enables the creation of different PDF documenents
| |
PDFDocInfo | PDFDocInfo is a high-level utility class that can be used
to read and modify document's metadata.
| |
PDFDocViewPrefs | PDFDocViewPrefs is a high-level utility class that can be
used to control the way the document is to be presented on
the screen or in print.
PDFDocViewPrefs class corresponds to PageMode, PageLayout, and
ViewerPreferences entries in the document's catalog. For more
details please refer to section 8.1 'Viewer Preferences' in
PDF Reference Manual.
| |
PDFDraw |
PDFDraw contains methods for converting PDF pages to images and to Bitmap objects.
Utility methods are provided to export PDF pages to various raster formats.
| |
PDFNetInternalTools | ||
PDFPrintManager |
The print class is used to register a print contract and set the standard print options.
All of the callbacks are implemented internally for ease of development. It uses the efficent
vector-based XPS print path when available.
Note: Printing in Windows Store Apps is typically invoked using the Charms Bar. If you wish to
implement a button that opens the print bar, call
await Windows.Graphics.Printing.PrintManager.ShowPrintUIAsync(); | |
PDFPrintTask |
Represents a printing operation using the PDFPrintManager
Replaces Windows::Graphics::Printing::PrintTask to allow altered behaviour
Note that PDFPrintTask does not provide a way to influence the printing, but just a way to notify of progress.
| |
PDFRasterizer | PDFRasterizer is a low-level PDF rasterizer.
The main purpose of this class is to convert PDF pages to raster images (or bitmaps).
PDFRasterizer is a relatively low-level class. If you need to convert PDF page to an image format or a Bitmap,
consider using PDF::PDFDraw. Similarly, if you are building an interactive PDF viewing application
use PDF::PDFViewCtrl instead.
| |
PDFViewCtrl |
PDFViewCtrl is a utility class that can be used for interactive rendering of PDF documents.
PDFViewCtrl is derived from Windows.UI.Xaml.Controls.ContentControl and it can be used like a regular Control (see PDFViewCtrlDemo for a concrete example).
PDFViewCtrl defines several coordinate spaces and it is important to understand their differences:
Page Space refers to the space in which a PDF page is defined. It is determined by a page itself and the origin is at the lower-left corner of the page.
Note that Page Space is independent of how a page is viewed in PDFView and each page has its own Page space.
Canvas Space refers to the tightest axis-aligned bounding box of all the pages given the current page presentation mode in PDFView.
For example, if the page presentation mode is e_single_continuous, all the pages are arranged vertically with one page in each row,
and therefore the Canvas Space is rectangle with possibly large height value. For this reason, Canvas Space is also, like Page Space,
independent of the zoom factor. Also note that since PDFView adds gaps between adjacent pages, the Canvas Space is larger than the
space occupied by all the pages. The origin of the Canvas Space is located at the upper-left corner.
Screen Space (or Client Space) is the space occupied by PDFView and its origin is at the upper-left corner. Note that the virtual size
of this space can extend beyond the visible region.
Scrollable Space is the virtual space within which PDFView can scroll. It is determined by the Canvas Space and the current zoom factor.
Roughly speaking, the dimensions of the Scrollable Space is the dimensions of the Canvas Space timed by the zoom. Therefore, a large zoom
factor will result in a larger Scrollable region given the same Canvas region. For this reason, Scrollable Space might also be referred to
as Zoomed Canvas Space. Note that since PDFView adds gaps between pages in Canvas Space and these gaps are not scaled when rendered, the
scrollable range is not exactly what the zoom factor times the Canvas range. For functions such as SetHScrollPos(), SetVScrollPos(),
GetCanvasHeight(), and GetCanvasWidth(), it is the Scrollable Space that is involved.
Remarks
Due to the Nature of C++/CX, subscribing to any event of the PDFViewCtrl will create a reference cycle.
Therefore, it is important to unsubscibe to these events when the PDFViewCtrl is no longer needed. In general, this can be done in the
OnNavigatedFrom function of a Windows.UI.Xaml.Controls.Page.
| |
PDFViewCtrlLinkInfo | PDFViewCtrlLinkInfo is an utility class that retains link information when used with GetLinkAt(). | |
PDFViewCtrlSelection | PDFViewCtrlSelection is a utility class that allows access to PDFViewCtrl's current selection. | |
PDFViewCtrlThumbnailRequestHandler | Helper class that allows the equivalent of PDFViewCtrl.GetThumbAsync(int pageNumber)
but without being forced to the captured Context of the PDFViewCtrl.
When a thumbnail is requested using this class, the OnThumbnailGenerated in a secondary thread.
| |
Point |
A class that represents a point.
| |
QuadPoint |
A class that represents four points.
| |
Rect |
Rect is a utility class used to manipulate PDF rectangle objects (refer to
section 3.8.3 of the PDF Reference Manual).
Rect can be associated with a SDF/Cos rectangle Array using Rect(Obj*) constructor
or later using Rect::Attach(Obj*) or Rect::Update(Obj*) methods.
Rect keeps a local cache for rectangle points so it is necessary to call Rect::Update()
method if the changes to the Rect should be saved in the attached Cos/SDF Array.
| |
RectCollection | ||
Redactor | ||
RedactorAppearance |
Class used to customize the appearance of the optional redaction overlay.
| |
RedactorRedaction | PDF Redactor is a separately licensable Add-on that offers options to remove (not just covering or obscuring) content within a region of PDF. With printed pages, redaction involves blacking-out or cutting-out areas of the printed page. With electronic documents that use formats such as PDF, redaction typically involves removing sensitive content within documents for safe distribution to courts, patent and government institutions, the media, customers, vendors or any other audience with restricted access to the content. The redaction process in PDFNet consists of two steps: a) Content identification: A user applies redact annotations that specify the pieces or regions of content that should be removed. The content for redaction can be identified either interactively (e.g. using 'pdftron.PDF.PDFViewCtrl' as shown in PDFView sample) or programmatically (e.g. using 'pdftron.PDF.TextSearch' or 'pdftron.PDF.TextExtractor'). Up until the next step is performed, the user can see, move and redefine these annotations. b) Content removal: Using 'pdftron.PDF.Redactor.Redact()' the user instructs PDFNet to apply the redact regions, after which the content in the area specified by the redact annotations is removed. The redaction function includes number of options to control the style of the redaction overlay (including color, text, font, border, transparency, etc.). PDFTron Redactor makes sure that if a portion of an image, text, or vector graphics is contained in a redaction region, that portion of the image or path data is destroyed and is not simply hidden with clipping or image masks. PDFNet API can also be used to review and remove metadata and other content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content. | |
Reflow |
Reflow annotations between PDF and HTML
| |
ReflowProcessor | ||
RefreshOptions |
Refresh Options class
| |
Separation | Separation contains a memory buffer and CMYK components' information about rasterized separations used in PDFDraw::GetSeparationBitmaps and PDFRasterizer::RasterizeSeparations
| |
Shading | Shading is a class that represents a flat interface around all PDF shading types:
| |
ShapedText |
A sequence of positioned glyphs -- the visual representation of a
given text string
| |
Stamper | Stamper is a utility class that can be used to PDF pages with text, images, or with other PDF content in only a few lines of code. Although Stamper is very simple to use compared to ElementBuilder/ElementWriter it is not as powerful or flexible. In case you need full control over PDF creation use ElementBuilder/ElementWriter to add new content to existing PDF pages as shown in the ElementBuilder sample project. | |
SVGOutputOptions |
A class containing options for ToSvg functions
| |
TextDiffOptions | ||
TextExtractor |
TextExtractor is used to analyze a PDF page and extract words and logical
structures that are visible within a given region. The resulting list of
lines and words can be traversed element by element or accessed as a
string buffer. The class also includes utility methods to extract PDF
text as HTML or XML.
Possible use case scenarios for TextExtractor include:
Remarks TextExtractor is analyzing only textual content of the page. This means that the rasterized (e.g. in scanned pages) or vectorized text (where glyphs are converted to path outlines) will not be recognized as text. Please note that it is still possible to extract this content using pdftron.PDF.ElementReader interface. In some cases TextExtractor may extract text that does not appear to be on the visible page (e.g. when text is obscured by an image or a rectangle). In these situations it is possible to use processing flags such as 'e_remove_hidden_text' and 'e_no_invisible_text' to remove hidden text. Examples
For full sample code, please take a look at TextExtract sample project.
//... Initialize PDFNet ... PDFDoc doc = new PDFDoc(filein); doc.initSecurityHandler(); Page page = doc.pageBegin().current(); TextExtractor txt = new TextExtractor(); txt.begin(page, 0, TextExtractor.ProcessingFlags.e_remove_hidden_text); string text = txt.getAsText(); // or traverse words one by one... TextExtractor.Word word; for (TextExtractor.Line line = txt.GetFirstLine(); line.IsValid(); line=line.GetNextLine()) { for (word=line.GetFirstWord(); word.IsValid(); word=word.GetNextWord()) { string w = word.GetString(); } } | |
TextExtractorLine | TextExtractorLine object represents a line of text on a PDF page.
Each line consists of a sequence of words, and each words in one or
more styles.
| |
TextExtractorStyle | A class representing predominant text style associated with a
given Line, a Word, or a Glyph. The class includes information about
the font, font size, font styles, text color, etc.
| |
TextExtractorWord | TextExtractorWord object represents a word on a PDF page.
Each word contains a sequence of characters in one or more styles
(see TextExtractor.Style).
| |
TextRange | The TextRange class represents a contiguous range of text on a PDF page.
It may be the result of a text search, or simply a couple of highlighted or
underlined words.
Each text range contains a few pieces of information:
page: the number of the page this piece of text is on;
position: the start position (text offset);
length: the length.
You are able to retrieve further information about the text range, such as its
coordinates, the text itself, as well as characters before and after.
| |
TextSearch | TextSearch searches through a PDF document for a user-given search pattern.
The current implementation supports both verbatim search and the search
using regular expressions, whose detailed syntax can be found at:
http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html
TextSearch also provides users with several useful search modes and extra
information besides the found string that matches the pattern. TextSearch
can either keep running until a matched string is found or be set to return
periodically in order for the caller to perform any necessary updates
(e.g., UI updates). It is also worth mentioning that the search modes can be
changed on the fly while searching through a document.
Possible use case scenarios for TextSearch include:
Examples
For a full sample, please take a look at the TextSearch sample project.
//... Initialize PDFNet ... PDFDoc doc = new PDFDoc(filein); doc.initSecurityHandler(); int mode = TextSearch.e_whole_word | TextSearch.e_page_stop; UString pattern("joHn sMiTh"); TextSearch txt_search = new TextSearch(); //PDFDoc doesn't allow simultaneous access from different threads. If this //document could be used from other threads (e.g., the rendering thread inside //PDFView/PDFViewCtrl, if used), it is good practice to lock it. //Notice: don't forget to call doc.Unlock() to avoid deadlock. doc.Lock(); txt_search.Begin( doc, pattern, mode, -1, -1 ); while ( true ) { TextSearch.ResultCode result = txt_search.Run(); if ( result.GetCode() == TextSearchResult.e_found ) { Console.WriteLine("found one instance: " + result.GetResultStr()); } else { break; } } //unlock the document to avoid deadlock. doc.UnLock(); | |
TimestampingConfiguration |
A class representing a set of options for timestamping a document.
| |
TimestampingResult |
A class representing the result of testing a timestamping configuration.
| |
TrustVerificationResult |
The detailed result of a trust verification step of a verification
operation performed on a digital signature.
| |
VerificationOptions | ||
VerificationResult |
The result of a verification operation performed on a digital signature.
| |
ViewChangeCollection |
Class for collecting changes to a PDFDoc and/or viewer, which can be
passed to various functions to act on. Allows for chaining of
modifications, which can then be updated by PDFNet in the best possible
way.
| |
WebFontDownloader |
static interface to control the behaviour of PDFNet web font downloading
| |
WordToPDFOptions |
Conversion options to be used when converting Word Document to PDF.
| |
XODOutputOptions |
A class containing options for ToXod functions
| |
XPSOutputOptions |
A class containing options for ToXps functions
|
Structure | Description | |
---|---|---|
TextExtractorCharRange | TextExtractorCharRange object represents a range of text
based on Unicode character indices.
|
Interface | Description | |
---|---|---|
IAnnot | IAnnot interface | |
IConversionOptions | IConversion options interface | |
IOptionsBase | IOptionsBase interface |
Delegate | Description | |
---|---|---|
DocumentPreviewCacheResponseDelgate | Delegate for retrieving responses from the DocumentPreviewCacheDelegate
| |
OnActionEventHandler | ||
OnConversionEventHandler | ||
OnDownloadEventHandler | ||
OnLayoutChangedHandler | ||
OnPageFlipFinishedEventHandler | ||
OnPageNumberChangedEventHandler | ||
OnRenderFinishedEventHandler | ||
OnScaleEventHandler | ||
OnSetDocEventHandler | ||
OnSizeEventHandler | ||
OnThumbnailGeneratedEventHandler | ||
OnThumbnailRequestCompletedEventHandler | ||
OnViewChangedEventHandler | ||
PrintRequestedEventHandler | ||
ReflowProcessorResponseDelgate | Delegate for retrieving responses from the ReflowProcessor
|
Enumeration | Description | |
---|---|---|
ActionFormActionFlag | Flags used by submit form actions. Exclude flag is also used by reset form action.
No other action types use flags in the current version of PDF standard (ISO 2300). | |
ActionType | Action types | |
AnnotAnnotationState |
Annotation Appearance types
| |
AnnotationOutputFlag |
Annotation Output Flag type
| |
AnnotBorderStyleStyle | Various appearances of the BorderStyle | |
AnnotEventType |
Event types for Annot
| |
AnnotFlag | Flags specifying various Characteristics of the annotation. | |
AnnotType | Annotation types | |
ColorSpaceType | Colorspace type | |
DestinationFitType | View Destination Fit Types | |
DigitalSignatureFieldDocumentPermissions |
Types of Signature Field Document Permissions
| |
DigitalSignatureFieldFieldPermissions |
Types of field permissions
| |
DigitalSignatureFieldSubFilterType |
Types of filters
| |
DisallowedChangeType | ||
DocumentConversionResult |
Types of document conversion results
| |
DocumentPreviewCachePreviewResult | The result of requesting a thumbnail from DocumentPreviewCache
| |
ElementType | Element types
| |
ElementWriterWriteMode | Enumeration describing the placement of the element written to a page. | |
ExternalAnnotManagerMode | ||
FieldEventType |
Event types for field.
| |
FieldFlag | Flags specifying various Characteristics of the fields. | |
FieldTextJustification | form of quadding (justification) to be used in displaying the text fields. | |
FieldType |
Interactive form field type.
| |
FlattenFlag |
Flattening options.
| |
FlattenThresholdFlag |
Flattening Threshold options.
| |
FontEncoding | Font encondig types | |
FontStandardType1Font | Font standard types | |
FontType | Font types | |
FunctionType | PDF functions types | |
GeometryCollectionSnappingMode | Geometry collection snnaping mode types | |
GStateBlendMode | The standard separable blend modes available in PDF. | |
GStateGStateAttribute | GStante attribute types | |
GStateLineCap | LineCap types | |
GStateLineJoin | LineJoin types | |
GStateRenderingIntent | GState rendering intent types | |
GStateTextRenderingMode | Text Rendering modes | |
ImageInputFilter | Image Input Filter types | |
InternalToolsLogBackend |
Used for Internal Testing. Will do nothing for most builds
| |
InternalToolsLogLevel |
Used for Internal Testing. Will do nothing for most builds
| |
JobRequestResultState | The result of requesting a reflowed page from ReflowProcessor
| |
ModificationPermissionsStatus | ||
OptimizerImageSettingsCompressionMode | Color and grayscale image compression mode
| |
OptimizerImageSettingsDownsampleMode | Color and grayscale image downsample mode
| |
OptimizerMonoImageSettingsCompressionMode | mono-image compression mode
| |
OptimizerMonoImageSettingsDownsampleMode | mono-image downsample mode
| |
PageBox |
PDF page can define as many as five separate boundaries to control various aspects of the
imaging process (for more details please refer to Section 10.10.1 'Page Boundaries' in PDF
Reference Manual).
| |
PageEventType |
Event types for Page
| |
PageLabelStyle | The numbering style to be used for the numeric portion of page label. | |
PageRotate |
Indicates the page rotations in degrees.
| |
PageSetFilter | ||
PathDataPathSegmentType | Enumeration used to indicate operator type. | |
PatternColorTilingType | ||
PatternColorType | ||
PDFDocEventType |
Event types for PDFDoc
| |
PDFDocExtractFlag |
PDFDocExtractFlag
| |
PDFDocInsertFlag |
PDFDocInsertFlag
| |
PDFDocViewPrefsPageLayout | PageLayout specifies the page layout to be used when the
document is opened | |
PDFDocViewPrefsPageMode | PageMode specifies how the document should be displayed
when opened | |
PDFDocViewPrefsViewerPref | ViewerPref enumeration specifies how various GUI elements
should behave when the document is opened. | |
PDFPrintTaskCompletion |
Enumerated values for status when printing completes
[Not available for Windows Phone]
| |
PDFRasterizerColorPostProcessMode | ColorPostProcessMode is used to modify colors after rendering. | |
PDFRasterizerOverprintPreviewMode | ||
PDFRasterizerType | PDFNet includes two separate rasterizer implementations utilizing different graphics libraries.
The default rasterizer is 'e_BuiltIn' which is a high-quality, anti-aliased and platform independent rasterizer.
This rasterizer is available on all supported platforms.
On Windows platforms, PDFNet also includes GDI+ based rasterizer.
(deprecated and will be removed in a future version of PDFNet)
This rasterizer is included mainly to provide vector output for printing, for EMF/WMF export, etc.
For plain image rasterization we recommend using the built-in rasterizer.
| |
PDFViewCtrlConversionType | ConversionType lists the events triggered by calling OpenUniversalDocument | |
PDFViewCtrlDownloadedType | DownloadedType lists the events triggered by calling OpenURLAsync. | |
PDFViewCtrlPagePresentationMode | PDFViewCtrlPagePresentationMode lists common modes of presenting PDF pages. | |
PDFViewCtrlPageViewMode | PDFViewCtrlPageViewMode lists common modes of viewing PDF pages. | |
PrinterContentTypes |
Enumerated values for specifying the document content to print.
[Not available for Windows Phone]
| |
PrinterModeDuplexMode | Enumerated values for specifying how the printed pages are flipped when duplexing | |
PrinterModeNUp | Enumerated values for specifying the layout of multiple document pages
onto output pages | |
PrinterModeNUpPageOrder | Enumerated values for specifying the ordering of document pages onto
output pages | |
PrinterModeOrientation | Enumerated values for specifying the orientation of output pages | |
PrinterModeOutputColor | Enumerated values for specifying the color mode for printing | |
PrinterModeOutputQuality | Enumerated values for specifying the quality of the printing | |
PrinterModePaperSize |
Paper sizes.
| |
PrinterModePrintContentTypes | Enumerated values for specifying the document content to print | |
PrinterModeScaleType | Enumerated values for specifying the scaling of document pages | |
ScaleType |
Enumerated values for specifying the scaling of document pages.
[Not available for Windows Phone]
| |
ShadingType | Shading types | |
ShapedTextFailureReason | ||
ShapingStatus | ||
SignaturesVerificationStatus | ||
StamperHorizontalAlignment | Stamper horizontal alignment | |
StamperSizeType | Stamper Size Types | |
StamperTextAlignment | Stamper text alignment | |
StamperVerticalAlignment | Stamper vertical alignment | |
TextExtractorProcessingFlags | Processing options that can be passed in Begin() method to direct the flow of content recognition algorithms. | |
TextExtractorXMLOutputFlags | Flags controlling the structure of XML output in a call to TextExtractor.GetAsXML(). | |
TextSearchResultCode | The code indicating the reason when a search returns. | |
TextSearchSearchMode | Search modes that control how searching is conducted. | |
TextSelectionMode | TextSelectionMode lists different text selection modes that can be used to highlight text. | |
VerificationOptionsCertificateTrustFlag | ||
VerificationOptionsSecurityLevel | ||
VerificationOptionsTimeMode | ||
VerificationResultDigestStatus | ||
VerificationResultDocumentStatus |
The result of a verification operation performed on a digital signature.
| |
VerificationResultTrustStatus | ||
ZoomLimitMode | Zoom Limit mode type |